Re-enabling a logger
Jean-Michel Pichavant
jeanmichel at sequans.com
Thu Oct 22 07:21:51 EDT 2009
jorma kala wrote:
> 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.
logging.disable(0)
JM
More information about the Python-list
mailing list