How to Suppress Debug Logs in Dagster Deployments
Last updated: October 27, 2025
Problem Description
Users may need to suppress debug logs in their production deployment when using Dagster loggers. This is particularly relevant when working with loggers created using get_dagster_logger() in a Dagster+ serverless environment.
Symptoms
Debug logs continue to appear despite configuring
python_log_level: INFOin deployment settingsLogger configuration appears correct but doesn't affect Dagster logger output
Root Cause
The managed_python_loggers configuration only applies to standard Python loggers, not Dagster loggers created with get_dagster_logger().
Solution
Switch from using get_dagster_logger() to using Python's standard logging module.
Step-by-Step Resolution
Replace Dagster logger with standard Python logger in your code:
import logging # Instead of: logger = get_dagster_logger("your_logger_name") logger = logging.getLogger("your_logger_name") logger.debug("This debug message will be suppressed") logger.info("This info message will show")Add your logger name to the managed_python_loggers configuration in your deployment settings:
python_logs: managed_python_loggers: - your_logger_name python_log_level: INFOVerify that debug messages are now suppressed while INFO level messages continue to appear
Prevention
When setting up new loggers in your Dagster deployment, use standard Python logging from the start if you need granular log level control.
Related Documentation
Python logging documentation: https://docs.python.org/3/library/logging.html