Redirecting stdout/stderr to the logging module (was Re: Using logging in the stdlib and its unit tests)
8 Dec
2010
8 Dec
'10
5:28 p.m.
On Thu, Dec 9, 2010 at 2:46 AM, Vinay Sajip
Nick Coghlan
writes: 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?
Is this for use at the C level? At the Python level, there's a post I wrote a while back which shows how to use a logger like an output stream:
http://plumberjack.blogspot.com/2009/09/how-to-treat-logger-like-output-stre...
Similar in concept, but more full-featured (i.e. supporting the relevant IO ABCs), allowing it to be used as a replacement for stdout/stderr. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
4859
Age (days ago)
4859
Last active (days ago)
2 comments
3 participants
participants (3)
-
Antoine Pitrou
-
Nick Coghlan
-
Vinay Sajip