[Python-Dev] Using logging in the stdlib and its unit tests

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Dec 8 17:28:30 CET 2010

On Wed, Dec 8, 2010 at 9:52 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> P.S. On a completely unrelated note, has anyone thought about creating
> a write-only TextIO stream that outputs received writes via the
> logging module?

I've done something similar for C++ iostreams many moons ago.  The
idea was to prepend all lines written to std::log with timestamp and
other information.   It worked reasonably well, but involved a lot of
C++ hackery at the time.   I think this is a great idea and would
allow existing libraries that use sys.stderr for messages start using
say the root logger instead when user redefines sys.stderr.

More information about the Python-Dev mailing list