Skip to content

Commit bb842e5

Browse files
committed
Moving handler to comment
1 parent ef76f35 commit bb842e5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

rust/operator-binary/src/product_logging.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ for logger_name, logger_config in LOGGING_CONFIG['loggers'].items():
114114
# otherwise DAGs cannot be loaded anymore.
115115
if logger_name != 'airflow.task':
116116
logger_config['propagate'] = True
117+
# The default behavior of airflow is to enforce log level 'INFO' on tasks. (https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#logging-level)
118+
# TODO: Make task handler log level configurable through CRDs with default 'INFO'.
119+
# e.g. LOGGING_CONFIG['handlers']['task']['level'] = {{task_log_level}}
120+
if 'task' in logger_config['handlers']:
121+
logger_config['level'] = logging.INFO
117122
118123
LOGGING_CONFIG.setdefault('formatters', {{}})
119124
LOGGING_CONFIG['formatters']['json'] = {{
@@ -133,10 +138,6 @@ LOGGING_CONFIG['handlers']['file'] = {{
133138
'backupCount': 1,
134139
}}
135140
136-
# The default behavior of airflow is to enforce log level 'INFO' on tasks. (https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#logging-level)
137-
# TODO: Make task handler log level configurable through CRDs with default 'INFO'.
138-
LOGGING_CONFIG['handlers']['task']['level'] = logging.INFO
139-
140141
LOGGING_CONFIG['root'] = {{
141142
'level': {root_log_level},
142143
'filters': ['mask_secrets'],

0 commit comments

Comments
 (0)