Issue 881676: logging says to call shutdown - make it more likely (original) (raw)

Issue881676

Created on 2004-01-21 20:30 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
logshut.txt jimjjewett,2004-01-21 20:30
Messages (2)
msg45314 - (view) Author: Jim Jewett (jimjjewett) Date: 2004-01-21 20:30
The logging module says (in the code) that logging. shutdown() should be called at application exit, but there is no way to enforce this -- particularly with an interactive session. Calling it twice leads to errors. This patch (1) Makes it safe to call shutdown more than once. (2) Uses atexit (with a workaround for Python 1.5) to flush and close buffers automatically when the system is shutting down normally.
msg45315 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2004-02-20 18:01
Logged In: YES user_id=308438 A version of this patch has been accepted and checked into CVS. The shutdown() call is now safe because closing a handler removes it from the internal list used by shutdown(). Thank you for the patch.
History
Date User Action Args
2022-04-11 14:56:02 admin set github: 39846
2004-01-21 20:30:03 jimjjewett create