[Python-Dev] StreamHandler eating exceptions (original) (raw)
Gustavo Niemeyer gustavo at niemeyer.net
Mon Oct 31 00:37:57 CET 2005
- Previous message: [Python-Dev] svn checksum error
- Next message: [Python-Dev] StreamHandler eating exceptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The StreamHandler available under the logging package is currently catching all exceptions under the emit() method call. In the Handler.handleError() documentation it's mentioned that it's implemented like that because users do not care about errors in the logging system.
I'd like to apply the following patch:
Index: Lib/logging/init.py
--- Lib/logging/init.py (revision 41357) +++ Lib/logging/init.py (working copy) @@ -738,6 +738,8 @@ except UnicodeError: self.stream.write(fs % msg.encode("UTF-8")) self.flush()
except KeyboardInterrupt:
raise except: self.handleError(record)
Anyone against the change?
-- Gustavo Niemeyer http://niemeyer.net
- Previous message: [Python-Dev] svn checksum error
- Next message: [Python-Dev] StreamHandler eating exceptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]