Skip to content

Commit

Permalink
Add exc_info to generic exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
PhrozenByte committed May 4, 2019
1 parent f629b38 commit e8cb18e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cron_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def _wait(self):
self._resetNotification()
self._timeout(0)
except Exception as error:
self.logger.critical("%s: %s", type(error).__name__, str(error))
self.logger.critical("%s: %s", type(error).__name__, str(error), exc_info=True)
raise

def _waitUntilScheduled(self):
Expand Down Expand Up @@ -600,7 +600,7 @@ def _notificationTimeoutCallback(self):

self._timeout(0)
except Exception as error:
self.logger.critical("%s: %s", type(error).__name__, str(error))
self.logger.critical("%s: %s", type(error).__name__, str(error), exc_info=True)
raise

return False
Expand Down Expand Up @@ -638,7 +638,8 @@ def _showNotification(self, notification):
self._logger.critical(
"While sending a notification, a exception occurred: %s: %s",
type(error).__name__,
str(error)
str(error),
exc_info=True
)
raise

Expand Down

0 comments on commit e8cb18e

Please sign in to comment.