Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Vinay Sajip
Glenn Linderman g.nevcal.com> writes: > I didn't dig through the logging docs to discover if there is an API > that returns a list of currently known loggers such that an > application could easily discover the current set.  It would be nice > to have such a thing, in any case

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Glenn Linderman
On 12/28/2010 4:16 AM, Vinay Sajip wrote: How does that sound? Sounds pretty rational, overall. If the leave_enabled flag can be turned on/off by the application, then I agree the arms race is unlikely. I didn't dig through the logging docs to discover if there is an API that returns a lis

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Vinay Sajip
Glenn Linderman g.nevcal.com> writes: > I thought of the idea of a flag to make loggers immune, but it > seemed it could lead to an arms race, where the knee-jerk reaction > of discovering that a library's logger got disabled would be to set > the flag, and, of course, the knee-je

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Nick Coghlan
On Tue, Dec 28, 2010 at 6:53 PM, Nick Coghlan wrote: > On Tue, Dec 28, 2010 at 6:28 PM, Glenn Linderman > wrote: >> On 12/28/2010 12:19 AM, Vinay Sajip wrote: >> >>> calls can support three levels of logger disabling: >>> - leave all existing loggers enabled (existing option) >> >> I think you m

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Nick Coghlan
On Tue, Dec 28, 2010 at 6:28 PM, Glenn Linderman wrote: > On 12/28/2010 12:19 AM, Vinay Sajip wrote: > >> calls can support three levels of logger disabling: >> - leave all existing loggers enabled (existing option) > > I think you mean disabled - that's the current behaviour. > >> - leave only fl

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Glenn Linderman
On 12/28/2010 12:19 AM, Vinay Sajip wrote: > calls can support three levels of logger disabling: > - leave all existing loggers enabled (existing option) I think you mean disabled - that's the current behaviour. > - leave only flagged loggers enabled (new default behaviour) > - disable all

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-28 Thread Glenn Linderman
On 12/27/2010 11:53 PM, Nick Coghlan wrote: However, rather than a manually maintained list of low level loggers, Yes, a manually maintained list would be bad. it may be feasible to just have a flag we can set on loggers that makes them immune to the default implicit disabling. Then the confi

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-27 Thread Nick Coghlan
On Tue, Dec 28, 2010 at 1:29 AM, Vinay Sajip wrote: >     However, it would be good to have some consistency of naming stdlib > loggers > - perhaps using __name__ as is recommended practice for library and > application > developers, but with a prefix such as "py." to indicate that it's a part o

Re: [Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-27 Thread Glenn Linderman
On 12/27/2010 7:29 AM, Vinay Sajip wrote: The logging configuration calls fileConfig and dictConfig disable all existing loggers, and enable only loggers explicitly named in the configuration (and their children). Although there is a disable_existing_loggers option for each configuration API, whi

[Python-Dev] Loggers in the stdlib and logging configuration APIs

2010-12-27 Thread Vinay Sajip
The logging configuration calls fileConfig and dictConfig disable all existing loggers, and enable only loggers explicitly named in the configuration (and their children). Although there is a disable_existing_loggers option for each configuration API, which can be used to prevent disabling of exist