Skip to content

Commit ef76f35

Browse files
committed
Using handler task to set log level, update comment
1 parent 8c04906 commit ef76f35

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rust/operator-binary/src/product_logging.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ 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-
# Adopting to airflows logging standards
118-
if logger_name == 'airflow.task':
119-
logger_config['level'] = logging.INFO
120117
121118
LOGGING_CONFIG.setdefault('formatters', {{}})
122119
LOGGING_CONFIG['formatters']['json'] = {{
@@ -136,6 +133,10 @@ LOGGING_CONFIG['handlers']['file'] = {{
136133
'backupCount': 1,
137134
}}
138135
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+
139140
LOGGING_CONFIG['root'] = {{
140141
'level': {root_log_level},
141142
'filters': ['mask_secrets'],

0 commit comments

Comments
 (0)