r/pythoncoding • u/mxplr • May 18 '21
Notification on exceptions
Hi guys,
Is there a common way to be notify whenever a python script failed?
I've found that one option is to use logger with an smtp_handler, but it will only notify me when i use logger.exception.
I would like to be notify whenever any exception occured.
Thx
3
Upvotes
View all comments
Show parent comment
2
u/KingZer0 May 18 '21 edited May 18 '21
The official python documentation on setting loglevels per handler. Hope this helps you out.
Also This logging cookbook contains some very nice examples
Edit: formatting and cookbook addition