Re: Logging to zero or more destinations

2008-07-09 Thread samwyse
On Jul 8, 3:01 pm, Rob Wolfe [EMAIL PROTECTED] wrote: samwyse [EMAIL PROTECTED] writes: P.S.  I tried researching this further by myself, but the logging module doesn't come with source (apparently it's written in C?) and I don't have the time to find and download the source to my laptop.

Logging to zero or more destinations

2008-07-08 Thread samwyse
In the Python 2.5 Library Reference, section 14.5.3 (Logging to multiple destinations), an example is given of logging to both a file and the console. This is done by using logging.basicConfig() to configure a log file, and then calling logging.getLogger('').addHandler(console) to add the

Re: Logging to zero or more destinations

2008-07-08 Thread Rob Wolfe
samwyse [EMAIL PROTECTED] writes: In the Python 2.5 Library Reference, section 14.5.3 (Logging to multiple destinations), an example is given of logging to both a file and the console. This is done by using logging.basicConfig() to configure a log file, and then calling

Re: Logging to zero or more destinations

2008-07-08 Thread Robert Kern
samwyse wrote: In the Python 2.5 Library Reference, section 14.5.3 (Logging to multiple destinations), an example is given of logging to both a file and the console. This is done by using logging.basicConfig() to configure a log file, and then calling logging.getLogger('').addHandler(console)

Re: Logging to zero or more destinations

2008-07-08 Thread Robert Kern
Rob Wolfe wrote: samwyse [EMAIL PROTECTED] writes: The only way that I can see for all three statements to be consistent is that the root logger starts with an empty list of handlers, and doesn't instantiate a default handler until either logging.basicConfig() is called, That is correct.