I need to change the logger.exception default behavior to write to my logger with level=CRITICAL. It seems like something I can change but I haven’t figured out how. My last resort is sys.excepthook but I don’t want to use it because I do formatting in there.
thanks!
You can log exceptions using
CRITICALlike this:which will behave just like
logger.exception, only with a level ofCRITICALrather thanERROR.