You could, however, replace this with a custom handler if you wish.
The record which was being processed is passed in to this method.
"""
- if raiseExceptions:
+ if raiseExceptions and sys.stderr: # see issue 13807
ei = sys.exc_info()
try:
- traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
+ traceback.print_exception(ei[0], ei[1], ei[2],
+ None, sys.stderr)
+ sys.stderr.write('Logged from file %s, line %s\n' % (
+ record.filename, record.lineno))
except IOError:
pass # see issue 5971
finally: