Re: Proposed changes to logging defaults

2010-12-15 Thread Gregory Ewing
Terry Reedy wrote: On 12/15/2010 3:46 AM, John Nagle wrote: You're assuming that the logging package has the right to blither on the default sys.stderr. The Python stdlib *already* assumes that it can write to stderr. Also ISTM that any program relying on nothing it calls ever writing to st

Re: Proposed changes to logging defaults

2010-12-15 Thread Terry Reedy
On 12/15/2010 3:46 AM, John Nagle wrote: You're assuming that the logging package has the right to blither on the default sys.stderr. The Python stdlib *already* assumes that it can write to stderr. Using logging instead will make it easier for app writers to do something else. -- Terry Jan

Re: Proposed changes to logging defaults

2010-12-15 Thread Steve Holden
On 12/15/2010 5:03 AM, Vinay Sajip wrote: > On Dec 15, 8:46 am, John Nagle wrote: >> You're assuming that theloggingpackage 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

Re: Proposed changes to logging defaults

2010-12-15 Thread Vinay Sajip
On Dec 15, 8:46 am, John Nagle wrote: >     You're assuming that theloggingpackage 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 b

Re: Proposed changes to logging defaults

2010-12-15 Thread John Nagle
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

Re: Proposed changes to logging defaults

2010-12-15 Thread Vinay Sajip
On Dec 15, 3:51 am, samwyse wrote: > I'm in favor of this change.  I've long wished that I could just add > lots of warning/error/infologgingto a script and have it just work > without having to spend time configuring theloggingsystem. Note that INFO logging will still not be sent to sys.stderr.

Re: Proposed changes to logging defaults

2010-12-14 Thread samwyse
On Dec 9, 6: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

Re: Proposed changes to logging defaults

2010-12-13 Thread Jean-Michel Pichavant
Vinay Sajip wrote: On Dec 10, 10:17 am, Jean-Michel Pichavant wrote: Hi Jean-Michel, I think Antoine answered your other points, so I'll address the last one: Last question, if no handler is found, why not simply drop the log event, doing nothing ? It sounds pretty reasonable and less int

Re: Proposed changes to logging defaults

2010-12-10 Thread Vinay Sajip
On Dec 10, 10:17 am, Jean-Michel Pichavant wrote: Hi Jean-Michel, I think Antoine answered your other points, so I'll address the last one: > Last question, if no handler is found, why not simply drop the log > event, doing nothing ? It sounds pretty reasonable and less intrusive. That is what

Re: Proposed changes to logging defaults

2010-12-10 Thread Antoine Pitrou
On Fri, 10 Dec 2010 11:17:33 +0100 Jean-Michel Pichavant wrote: > Why would you log informative messages to stderr ? (debug, info, warning) > How stderr is a better choice than stdout ? By construction really. stderr is initially for errors, but it is generally used for "out of band" messages suc

Re: Proposed changes to logging defaults

2010-12-10 Thread Jean-Michel Pichavant
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 t

Re: Proposed changes to logging defaults

2010-12-09 Thread Vinay Sajip
On Dec 10, 12:48 am, Ethan Furman wrote: > > I like the changes proposed. > > Question about the "handler of last resort":  is there only one of them, > or will each library have its own so it can decide what the minimum > severity should be for itself? Libraries decide their severities different

Re: Proposed changes to logging defaults

2010-12-09 Thread Ethan Furman
Vinay Sajip wrote: Some changes are being proposed to how logging works in default configurations. I like the changes proposed. Question about the "handler of last resort": is there only one of them, or will each library have its own so it can decide what the minimum severity should be for

Proposed changes to logging defaults

2010-12-09 Thread Vinay Sajip
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.st