Problem with logging module

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Oct 20 05:07:44 EDT 2004


[Steve]
>> if not logger.handler(dir + '/' + name + '.log'):
[Diez]
> There is the (unfortunately undocumented) property "handlers" on a Logger
> insnstance that you can use:

The handlers property is not documented because it is not normally
meant to be used by clients of the logging package. Since handlers can
include third party handlers, the answer to 'what is an existing
handler?' is not in general known to the logging package. This is why
something like the functionality suggested by Steve is not provided in
the box.

Regards,


Vinay Sajip



More information about the Python-list mailing list