[Python-ideas] Logging2 with default NullHandler

anatoly techtonik techtonik at gmail.com
Wed Mar 14 20:28:44 CET 2012


Badly need `logging2` module that has NullHandler assigned by default
for all loggers.
http://packages.python.org/Logbook/api/handlers.html#logbook.NullHandler

Why? Because logging fails to play well with libraries:

   import logging
   log = logging.getLogger(__name__)
   log.warn("WARN")

   No handlers could be found for logger "spyderlib.utils.bsdsocket"

What do I want from library logging as a Python application developer?
Nothing until I explicitly setup default behaviour.

logging can not be changed, and leaving everything as-is is a PITA,
that's why I am
proposing for logging2 as the only viable solution.
--
anatoly t.



More information about the Python-ideas mailing list