[Python-Dev] Proposed change to logging (original) (raw)
Guido van Rossum guido at python.org
Wed Aug 25 05:47:04 CEST 2004
- Previous message: [Python-Dev] Proposed change to logging
- Next message: [Python-Dev] Proposed change to logging
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/)
- Previous message: [Python-Dev] Proposed change to logging
- Next message: [Python-Dev] Proposed change to logging
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]