[Python-Dev] Proposed change to logging

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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant