Re-enabling a logger

jorma kala jjkk73 at gmail.com
Thu Oct 22 06:56:14 EDT 2009


Hi,
I'm using the logging module.
At one point in my code I disable logging like this:

logging.disable(logging.INFO)

But how can I enable the logging again further on?

I've tried the following, which doesn't work for re-enabling the logger:

my_logger.setLevel(logging.INFO)

I've also tried to disable the logger by doin this:

 my_logger.setLevel(logging.NOTSET)

and then re-enabling like this:

my_logger.setLevel(logging.INFO)

But that doesnt work either.

Can you tell me how to re-enable the logging?
Many thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091022/c055d6d5/attachment.html>


More information about the Python-list mailing list