Proper way to delete/kill a logger?

cassiope fpm at u.washington.edu
Mon Nov 28 11:27:07 EST 2011


Thanks Chris and JM, I will explore how much work it's going to take
to change the various scripts to _always_ starting the logger from
main().
As further explanation - this code predates the logging module, and
many of the functions/classes had an optional argument for the home-
made
logger - and where the caller didn't provide it, it was locally
created.
The unit tests were carefully enough put together to provide almost
complete coverage, resulting in creating the logger possibly a dozen
or more times in the course of the tests.

So I appreciate what "doing it the right way" means, I was just hoping
not to have to go there, as I have a lot of code that uses the old
structures.  It makes it harder to justify moving to the "newer"
module.

I'll have to try the logger.handlers=[] approach, thanks.



More information about the Python-list mailing list