You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/11/01 20:13:09 UTC

[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #27447: Activate debug logging in commands with --verbose option

ephraimbuddy commented on code in PR #27447:
URL: https://github.com/apache/airflow/pull/27447#discussion_r1010857115


##########
airflow/utils/cli.py:
##########
@@ -107,6 +113,10 @@ def wrapper(*args, **kwargs):
             finally:
                 metrics['end_datetime'] = datetime.utcnow()
                 cli_action_loggers.on_post_execution(**metrics)
+                if verbose:
+                    root_logger.setLevel(logging.NOTSET)
+                    for handler in root_logger.handlers:
+                        handler.setLevel(logging.NOTSET)

Review Comment:
   You are right; we don't need to unset, and users are not expected to call this from python. 
   Also, since it's exiting, we don't need to track the config. I was looking at a similar unsetting code down the module when I implemented that but it's actually not necessary



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org