Produce consistent log output
This commit is contained in:
parent
d54f1bedda
commit
16ad7ae5aa
@ -75,7 +75,8 @@ def log_uncaught_exceptions(_ex_cls, ex, tb):
|
|||||||
print("\033[1;31;47m")
|
print("\033[1;31;47m")
|
||||||
logging.critical(''.join(traceback.format_tb(tb)))
|
logging.critical(''.join(traceback.format_tb(tb)))
|
||||||
print("\033[1;37;40m")
|
print("\033[1;37;40m")
|
||||||
print(stackprinter.format(ex, style="darkbg2", add_summary=True))
|
print(stackprinter.format(ex, show_vals="all", add_summary=True,
|
||||||
|
style="darkbg"))
|
||||||
if os.environ["MM_ENV"] == "PRODUCTION":
|
if os.environ["MM_ENV"] == "PRODUCTION":
|
||||||
msg = stackprinter.format(ex)
|
msg = stackprinter.format(ex)
|
||||||
send_mail(Config.ERRORS_TO, Config.ERRORS_FROM,
|
send_mail(Config.ERRORS_TO, Config.ERRORS_FROM,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user