Proposed changes to logging defaults

John Nagle nagle at animats.com
Wed Dec 15 03:46:57 EST 2010


On 12/9/2010 4:12 PM, Vinay Sajip wrote:
> Some changes are being proposed to how logging works in default
> configurations.
>
> Briefly - when a logging event occurs which needs to be output to some
> log, the behaviour of the logging package when no explicit logging
> configuration is provided will change, most likely to log those events
> to sys.stderr with a default format.

    Bad idea.

    You're assuming that the logging package has the right to blither
on the default sys.stderr.  There are many cases in which it
should not.  The program could be running in a web server, and
output would end up in the output HTML.  The program could be
running as a subprocess, and the output could end up in the
pipe back to the the parent.  "sys.stderr" might be connected
to a dead pipe, and writing to it would then kill the program.

    So this change could break existing programs in subtle ways.

				John Nagle



More information about the Python-list mailing list