On Wed, Jul 23, 2014 at 5:46 PM, Steven D'Aprano <st...@pearwood.info> wrote: > On Wed, 23 Jul 2014 07:14:27 +0000, Steven D'Aprano wrote: > >> I have some code which sets up a logger instance, then installs it as >> sys.excepthook to capture any uncaught exceptions: > > Oh! I should have said, I'm running Python 2.6.
Ah! I tried it in 2.7 and it seemed to work. One moment... huix@huix:~$ python mylogging.py Traceback (most recent call last): File "mylogging.py", line 24, in <module> foo # Die with uncaught NameError. NameError: name 'foo' is not defined huix@huix:~$ python -V Python 2.6.6 huix@huix:~$ tail /var/log/syslog ... Jul 23 18:01:49 huix INFO: started logging [mylogging] Jul 23 18:01:49 huix INFO: installing error handler [mylogging] Jul 23 18:01:49 huix ERROR: Uncaught <type 'exceptions.NameError'>: name 'foo' is not defined [mylogging]#012None Still not sure what's going on. Odd. ChrisA -- https://mail.python.org/mailman/listinfo/python-list