Apache Airflow: Logging Control [Disable / Adjust logging level]

I am using Airflow 1.7.1.3 installed using pip

I would like to limit logging to ERROR for the workflow run by the scheduler. Could not find anything but setting the location of the log files in the settings.py file.

In addition, online resources led me to this discussion in the google group here , but there is not much information here.

Any idea how to manage logging in Airflow?

+6
source share
3 answers

Logging functionality and configuration will be changed in version 1.9 using commit

+1
source

I tried working below and seems to be working on setting LOGGING_LEVEL outside settings.py :

  • Update settings.py :

    • Delete or comment line:
      LOGGING_LEVEL = logging.INFO

    • Add line:
      LOGGING_LEVEL = os.path.expanduser(conf.get('core', 'LOGGING_LEVEL'))

  • Update configuration file airflow.cfg :

    • Add a line under [core] : logging_level = WARN

    • Restart webserver and scheduler services

+3
source

The only solution I know of is changing LOGGING_LEVEL in the settings.py file. The default level is set to INFO .

 AIRFLOW_HOME = os.path.expanduser(conf.get('core', 'AIRFLOW_HOME')) SQL_ALCHEMY_CONN = conf.get('core', 'SQL_ALCHEMY_CONN') LOGGING_LEVEL = logging.INFO DAGS_FOLDER = os.path.expanduser(conf.get('core', 'DAGS_FOLDER')) 
0
source

Source: https://habr.com/ru/post/1014893/


All Articles