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

Glenn Linderman v+python at g.nevcal.com
Sat Dec 11 10:44:33 CET 2010


On 12/11/2010 1:07 AM, Nick Coghlan wrote:
> As Glenn mentioned later in the thread, the output of logging.info and
> logging.debug messages is*distinct*  from an application's normal
> operational output that is emitted on stdout. So making it easy to
> emit such messages on stderr is the right thing to do - it's OK that
> it requires a bit of additional set up to get them onto stdout instead
> (since they really don't belong there most of the time).
>
> I know my own rule of thumb is going to be updated along the lines of
> "Am I writing to sys.stderr, or guarding output with a verbosity flag?
> Then perhaps I should be using the logging module rather than print
> statements".

I'm in agreement with all this.  Thanks for the correction.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101211/5e133ae7/attachment.html>


More information about the Python-Dev mailing list