python 2.4 logging module

Vinay Sajip vinay_sajip at yahoo.co.uk
Fri Mar 10 19:36:14 CET 2006


Pramod wrote:

> Hi All,
>
> How can I remove an Instance of logger ?
> I need this feature in one of my script where I need to associate each
> time logger instance to different handler.
>
> Thanks in advance
> Pramod

Are you sure you are using logging in the right way? What do you mean
by "each time"?

You can use addHandler and removeHandler, but the Logger instance stays
- it's effectively a singleton.

Vinay Sajip




More information about the Python-list mailing list