ghaggart edited a comment on issue #9006: URL: https://github.com/apache/airflow/issues/9006#issuecomment-1050208433
I have this same issue with a recent Docker Airflow Image Version: [v2.2.3](https://pypi.python.org/pypi/apache-airflow/2.2.3) Git Version: .release:2.2.3+06c82e17e9d7ff1bf261357e84c6013ccdb3c241 I am running Airflow on a single host (scheduler/worker/webserver) using docker-compose with LocalExecutor. I specify the `AIRFLOW__LOGGING__LOGGING_LEVEL=INFO` in my Docker .env file, and inside the scheduler container the airflow.cfg is reporting as INFO, but the tasks still write DEBUG messages to the Airflow logs. Airflow Docker .env config: ``` AIRFLOW__LOGGING__BASE_LOG_FOLDER=/opt/airflow/logs AIRFLOW__LOGGING__LOGGING_LEVEL=INFO AIRFLOW__LOGGING__FAB_LOGGING_LEVEL=WARNING AIRFLOW__CORE__SQL_ALCHEMY_CONN=postgresql+psycopg2://databases:password@postgres:port/airflow AIRFLOW__CORE__EXECUTOR=LocalExecutor AIRFLOW__CORE__PLUGINS_FOLDER=/opt/airflow/plugins AIRFLOW__WEBSERVER__WORKERS=2 AIRFLOW__WEBSERVER__BASE_URL=base_url AIRFLOW__SCHEDULER__MIN_FILE_PROCESS_INTERVAL=60 AIRFLOW__SCHEDULER__DAG_DIR_LIST_INTERVAL=120 AIRFLOW__SCHEDULER__CHILD_PROCESS_LOG_DIRECTORY=/opt/airflow/logs/scheduler AIRFLOW__API__AUTH_BACKEND=airflow.api.auth.backend.basic_auth ``` airflow.cfg inside the running container: ``` # Logging level. # # Supported values: ``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG``. logging_level = INFO # Logging level for Flask-appbuilder UI. # # Supported values: ``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, ``DEBUG``. fab_logging_level = WARNING # Logging class # Specify the class that will specify the logging configuration # This class has to be on the python classpath # Example: logging_config_class = my.path.default_local_settings.LOGGING_CONFIG logging_config_class = ``` DEBUG logs from a task: `[2022-02-24 16:11:59,335] {script.py:1385} DEBUG - 'debug message' ` My understanding is that this should configure the root logger to be INFO? From airflow_local_settings.py: ``` DEFAULT_LOGGING_CONFIG: Dict[str, Any] = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'airflow': {'format': LOG_FORMAT}, 'airflow_coloured': { 'format': COLORED_LOG_FORMAT if COLORED_LOG else LOG_FORMAT, 'class': COLORED_FORMATTER_CLASS if COLORED_LOG else 'logging.Formatter', }, }, 'filters': { 'mask_secrets': { '()': 'airflow.utils.log.secrets_masker.SecretsMasker', }, }, 'handlers': { 'console': { 'class': 'airflow.utils.log.logging_mixin.RedirectStdHandler', 'formatter': 'airflow_coloured', 'stream': 'sys.stdout', 'filters': ['mask_secrets'], }, 'task': { 'class': 'airflow.utils.log.file_task_handler.FileTaskHandler', 'formatter': 'airflow', 'base_log_folder': os.path.expanduser(BASE_LOG_FOLDER), 'filename_template': FILENAME_TEMPLATE, 'filters': ['mask_secrets'], }, 'processor': { 'class': 'airflow.utils.log.file_processor_handler.FileProcessorHandler', 'formatter': 'airflow', 'base_log_folder': os.path.expanduser(PROCESSOR_LOG_FOLDER), 'filename_template': PROCESSOR_FILENAME_TEMPLATE, 'filters': ['mask_secrets'], }, }, 'loggers': { 'airflow.processor': { 'handlers': ['processor'], 'level': LOG_LEVEL, 'propagate': False, }, 'airflow.task': { 'handlers': ['task'], 'level': LOG_LEVEL, 'propagate': False, 'filters': ['mask_secrets'], }, 'flask_appbuilder': { 'handlers': ['console'], 'level': FAB_LOG_LEVEL, 'propagate': True, }, }, 'root': { 'handlers': ['console'], 'level': LOG_LEVEL, 'filters': ['mask_secrets'], }, } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
