Shrividya commented on code in PR #67719:
URL: https://github.com/apache/airflow/pull/67719#discussion_r3328059487


##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -936,7 +936,7 @@ def get_logger(trigger_id: int) -> WrappedLogger:
             if exc := event.pop("exception", None):
                 # TODO: convert the dict back to a pretty stack trace
                 event["error_detail"] = exc
-            if lvl_name := NAME_TO_LEVEL.get(event.pop("level")):
+            if lvl_name := NAME_TO_LEVEL.get(event.pop("level", "warning")):

Review Comment:
   in case of level being set to an unknown string, the lvl_name is set to None 
and the next line gets skipped totally. For a fix aimed at not losing log 
lines, it's better to have a real level like logging.WARNING as a fallback 
option.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to