mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Used cgitb instead of the default exception printing.
This commit is contained in:
parent
9264b635e2
commit
17d9a59845
@ -35,6 +35,7 @@ import fix
|
||||
|
||||
import os
|
||||
import sys
|
||||
import cgitb
|
||||
import atexit
|
||||
import logging
|
||||
|
||||
@ -61,8 +62,7 @@ class Formatter(logging.Formatter):
|
||||
for exn in deadlyExceptions:
|
||||
if issubclass(e.__class__, exn):
|
||||
raise
|
||||
### TODO: formatException should use cgitb.
|
||||
return logging.Formatter.formatException(self, (E, e, tb))
|
||||
return cgitb.text((E, e, tb)).rstrip('\r\n')
|
||||
|
||||
|
||||
class DailyRotatingHandler(logging.FileHandler):
|
||||
|
Loading…
Reference in New Issue
Block a user