[Python-Dev] Logging with no handlers configured (original) (raw)
Walter Dörwald walter at livinglogic.de
Thu Jul 22 12:26:37 CEST 2004
- Previous message: [Python-Dev] Logging with no handlers configured
- Next message: [Python-Dev] SWIG comments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Vinay Sajip wrote:
Currently, if the logging module is used with no handlers configured for a logger or its parents and you try to log events with that logger, a single message is printed to sys.stderr:
No handlers could be found for logger It has been suggested that this puts out a spurious message when, for whatever reason, a developer intentionally does not configure any handlers. [...] All feedback gratefully received,
How about a LoggingConfigurationWarning and using warnings.warn()? Then what should happen with the warning (ignore, print, raise exception) could be configured via the warning framework.
Bye, Walter Dörwald
- Previous message: [Python-Dev] Logging with no handlers configured
- Next message: [Python-Dev] SWIG comments
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]