Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment: > Why is this exactly? Why do you want to keep handlers until shutdown
> rather than dispose of them when they aren't used anymore? Typically handlers are only instantiated when being added to loggers, and loggers live for the lifetime of the process so those handler references will typically be persistent. However, if a handler is closed (typically after removing from a handler), it's removed from the list and would not cause a memory leak. > Moreover, closing in atexit is rather bad because the resources > necessary for proper closing (files, sockets...) may already have been > freed. That's potentially true, but it's behaviour which has been there from the beginning so ISTM it needs to be there for backward compatibility reasons :-( When logging.raiseExceptions is True (the default) any exceptions in shutdown() would be raised, but this doesn't appear to happen in practice. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6615> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com