mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +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 os
|
||||||
import sys
|
import sys
|
||||||
|
import cgitb
|
||||||
import atexit
|
import atexit
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -61,8 +62,7 @@ class Formatter(logging.Formatter):
|
|||||||
for exn in deadlyExceptions:
|
for exn in deadlyExceptions:
|
||||||
if issubclass(e.__class__, exn):
|
if issubclass(e.__class__, exn):
|
||||||
raise
|
raise
|
||||||
### TODO: formatException should use cgitb.
|
return cgitb.text((E, e, tb)).rstrip('\r\n')
|
||||||
return logging.Formatter.formatException(self, (E, e, tb))
|
|
||||||
|
|
||||||
|
|
||||||
class DailyRotatingHandler(logging.FileHandler):
|
class DailyRotatingHandler(logging.FileHandler):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user