> > > > > So far so good, but I'd like to record (possibly unhandled) exceptions > > > in the logfile. > > > * Do I need to explicitly trap every single exception ? > > > * In that case, won't I get 2 log messages on the console (as > > > illustrated in the code below: >
Check out sys.excepthook, something vaguely like: import sys def handle_exceptions(exctype, value, traceback): logging.exception("An unhandled exception was detected.") sys.excepthook = handle_exceptions
-- http://mail.python.org/mailman/listinfo/python-list