Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow - Disable heartbeat logs

Tags:

python

airflow

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.

EDIT: I'm using Airflow 1.10.6

like image 273
Andy Carlson Avatar asked Dec 02 '19 15:12

Andy Carlson


1 Answers

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.

like image 80
kaxil Avatar answered Nov 06 '22 01:11

kaxil