Skip to content

Commit

Permalink
log exception when debugging level logging is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
seanshahkarami committed Jul 11, 2022
1 parent ed01431 commit 623535b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/waggle/plugin/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def __main(self):
try:
self.__connect_and_flush_messages()
except Exception:
if logger.isEnabledFor(logging.DEBUG):
logger.exception("__connect_and_flush_messages exception")
time.sleep(1)
finally:
self.done.set()
Expand Down Expand Up @@ -108,6 +110,8 @@ def __main(self):
try:
self.__connect_and_consume_messages()
except Exception:
if logger.isEnabledFor(logging.DEBUG):
logger.exception("__connect_and_consume_messages exception")
time.sleep(1)
finally:
self.done.set()
Expand Down

0 comments on commit 623535b

Please sign in to comment.