Airflow - Disable heartbeat logs

随声附和 提交于 2020-01-22 21:29:26

问题


My logs are getting completely flooded with useless messages for every heartbeat.

[2019-11-27 21:32:47,890] {{logging_mixin.py:112}} INFO - [2019-11-27 21:32:47,889] {local_task_job.py:124} WARNING - Time since last heartbeat(0.02 s) < heartrate(5.0 s), sleeping for 4.983326 s
[2019-11-27 21:32:52,921] {{logging_mixin.py:112}} INFO - [2019-11-27 21:32:52,921] {local_task_job.py:124} WARNING - Time since last heartbeat(0.02 s) < heartrate(5.0 s), sleeping for 4.984673 s
[2019-11-27 21:32:57,949] {{logging_mixin.py:112}} INFO - [2019-11-27 21:32:57,949] {local_task_job.py:124} WARNING - Time since last heartbeat(0.01 s) < heartrate(5.0 s), sleeping for 4.985953 s
[2019-11-27 21:33:02,980] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:02,980] {local_task_job.py:124} WARNING - Time since last heartbeat(0.02 s) < heartrate(5.0 s), sleeping for 4.984688 s
[2019-11-27 21:33:08,008] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:08,008] {local_task_job.py:124} WARNING - Time since last heartbeat(0.01 s) < heartrate(5.0 s), sleeping for 4.987069 s
[2019-11-27 21:33:13,041] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:13,041] {local_task_job.py:124} WARNING - Time since last heartbeat(0.02 s) < heartrate(5.0 s), sleeping for 4.984275 s
[2019-11-27 21:33:18,072] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:18,071] {local_task_job.py:124} WARNING - Time since last heartbeat(0.01 s) < heartrate(5.0 s), sleeping for 4.986545 s
[2019-11-27 21:33:23,101] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:23,100] {local_task_job.py:124} WARNING - Time since last heartbeat(0.02 s) < heartrate(5.0 s), sleeping for 4.984889 s
[2019-11-27 21:33:28,130] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:28,130] {local_task_job.py:124} WARNING - Time since last heartbeat(0.01 s) < heartrate(5.0 s), sleeping for 4.986234 s
[2019-11-27 21:33:33,160] {{logging_mixin.py:112}} INFO - [2019-11-27 21:33:33,160] {local_task_job.py:124} WARNING - Time since last heartbeat(0.01 s) < heartrate(5.0 s), sleeping for 4.986669 s

Our logs are now too noisy to be useful. How can we disable these? Changing the log level to something like logging.WARN is not an option because we have lots of actually useful information at the INFO level.


回答1:


Currently, it is not possible to disable it. I have created a PR that changes the log level to DEBUG. Unfortunately, this won't be available until the next release (1.10.7).

The short-time solution would to manually apply the change in the PR to your Airflow installation.



来源:https://stackoverflow.com/questions/59142508/airflow-disable-heartbeat-logs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!