xuganyu96 commented on code in PR #32707:
URL: https://github.com/apache/airflow/pull/32707#discussion_r1271389213


##########
airflow/cli/commands/scheduler_command.py:
##########
@@ -34,12 +35,17 @@
 from airflow.utils.cli import process_subdir, setup_locations, setup_logging, 
sigint_handler, sigquit_handler
 from airflow.utils.scheduler_health import serve_health_check
 
+log = logging.getLogger(__name__)

Review Comment:
   Naming variables one way or another seems ultimately trivial, so I am 
perfectly okay with changing the variable name to `logger`.
   
   On the other hand, I am not sure about using `AirflowConsole` for logging 
purposes. The code changes are located under the `cli` module, but they are 
ultimately meant to catch exceptions that came up within the inner logic of the 
scheduler, so I think it should be treated like a normal logger.
   
   Another situation where I think using a logger is more appropriate is when 
the scheduler is run as a daemon (with `airflow scheduler -D`), in which case 
using the `AirflowConsole` will not log the exception.



-- 
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