[Python-Dev] Proposed change to logging (original) (raw)

Guido van Rossum guido at python.org
Wed Aug 25 05:47:04 CEST 2004


import logging

logging.basicConfig() logger = logging.getLogger("my.app") err = logger.getFileObject(logging.ERROR) dbg = logger.getFileObject(logging.DEBUG) ... print >> err, "My logging message with %s" % "arguments" print >> dbg, "A message at %s level" % "debug"

Is this really a useful improvement? It seems to save a few keystrokes at most. TOOWTDI etc.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list