classification
Title: logging handlers can close without flush
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: jimjjewett, vinay.sajip
Priority: normal Keywords:

Created on 2004-02-20 20:14 by jimjjewett, last changed 2004-02-21 22:19 by vinay.sajip. This issue is now closed.

Messages (2)
msg20084 - (view) Author: Jim Jewett (jimjjewett) Date: 2004-02-20 20:14
logging.Handler().close() does not call flush().  Some 
derived handlers override this and call flush themselves; 
some do not.  I'm not certain which streams are buffered 
under the hood, but I think it would be fine to call flush in 
all cases.  In particular, I think BufferingHandler should 
always flush, and FileHandler probably should too.

Note that just adding it to Handler().close() would not 
work with the current CVS version, as the derived class 
may call the parent close (to clean up _handlers) after 
closing (and making unflushable) the stream.
msg20085 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2004-02-21 22:19
Logged In: YES 
user_id=308438

Just checked in fixes into CVS.
History
Date User Action Args
2004-02-20 20:14:54jimjjewettcreate