uranusjr commented on a change in pull request #20491:
URL: https://github.com/apache/airflow/pull/20491#discussion_r775023882



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -684,7 +684,7 @@ def _execute(self) -> None:
 
             settings.Session.remove()  # type: ignore
         except Exception:
-            self.log.exception("Exception when executing 
SchedulerJob._run_scheduler_loop")
+            self.log.error("Exception when executing 
SchedulerJob._run_scheduler_loop")

Review comment:
       > duplicated exception stack printing
   
   Where is the second time the exception is printed? If it is not caught (and 
the exception is printed by Python on exit), these are not conceptually 
duplicates because not all logs are handled by the console, and removing the 
log here makes the exception invisible if the outmost exception is not 
connected to a console (and the one here is logged to a file).




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