You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/24 19:55:59 UTC

[GitHub] [airflow] ghaggart edited a comment on issue #9006: Provide a way to config log level for airflow processes

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 config:
   ```
   AIRFLOW__LOGGING__BASE_LOG_FOLDER=/opt/airflow/logs
   AIRFLOW__LOGGING__LOGGING_LEVEL=INFO
   AIRFLOW__LOGGING__FAB_LOGGING_LEVEL=WARNING
   AIRFLOW__CORE__EXECUTOR=/opt/airflow/logs
   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' `


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org