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

我怕爱的太早我们不能终老 提交于 2019-12-04 01:57:23

The logging functionality and its configuration will be changed in version 1.9 with this commit

Kiran

I tried below work around and it seems to be working to set LOGGING_LEVEL outside of settings.py:

  • Update settings.py:

    • Remove or comment line:
      LOGGING_LEVEL = logging.INFO

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

  • Update airflow.cfg configuration file:

    • Add line under [core]: logging_level = WARN

    • Restart webserver and scheduler services

  • Use environment vaiable AIRFLOW__CORE__LOGGING_LEVEL=WARN.

See the official docs for details.

Only solution I am aware of is changing LOGGING_LEVEL in settings.py file. 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'))
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!