Print traces also on stderr

This commit is contained in:
Marco Pesenti Gritti 2006-08-15 13:15:46 +02:00
parent 621e43563f
commit b1c7385204
2 changed files with 2 additions and 1 deletions

View File

@ -80,6 +80,7 @@ class Handler(logging.Handler):
def __exception_handler(typ, exc, tb): def __exception_handler(typ, exc, tb):
trace = StringIO() trace = StringIO()
traceback.print_exception(typ, exc, tb, None, trace) traceback.print_exception(typ, exc, tb, None, trace)
print >> sys.stderr, trace.getvalue()
__queue.append(logging.ERROR, trace.getvalue()) __queue.append(logging.ERROR, trace.getvalue())