Display uncaught exceptions red on white

This commit is contained in:
Keith Edmunds 2021-04-30 02:48:06 +01:00
parent 51b2dd43e5
commit 858bf4392e

View File

@ -49,7 +49,9 @@ log.addHandler(syslog)
def log_uncaught_exceptions(ex_cls, ex, tb): def log_uncaught_exceptions(ex_cls, ex, tb):
print("\033[1;31;47m")
logging.critical(''.join(traceback.format_tb(tb))) logging.critical(''.join(traceback.format_tb(tb)))
print("\033[1;37;40m")
logging.critical('{0}: {1}'.format(ex_cls, ex)) logging.critical('{0}: {1}'.format(ex_cls, ex))