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 2021/03/16 08:07:10 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #14823: `logging.exception` redundancy.

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



##########
File path: airflow/models/taskinstance.py
##########
@@ -1297,9 +1297,10 @@ def signal_handler(signum, frame):  # pylint: disable=unused-argument
                     registered = task_copy.register_in_sensor_service(self, context)
                 except Exception as e:
                     self.log.warning(
-                        "Failed to register in sensor service.Continue to run task in non smart sensor mode."
+                        "Failed to register in sensor service."
+                        "Continue to run task in non smart sensor mode.",
+                        exc_info=True
                     )
-                    self.log.exception(e, exc_info=True)

Review comment:
       This (and some more other changes) makes the message warning-only (previously there’d be one warning and one error message each) and may affect compatibility.




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

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