New submission from David W. Lambert <[EMAIL PROTECTED]>: Library documents claim that logging.Handler.close does nothing, but the source code shows otherwise---it removes itself from the internal handler list. The error propagates treelike through the subclasses. (I found references to close in stream handler flush and NTEventLogHandler subclass). I have source code for version 2.5, but the error likely persists through version 3.03b which
http://docs.python.org/dev/3.0/library/logging.html#logging.StreamHandl er claims, "flush()ΒΆ Flushes the stream by calling its flush() method. Note that the close () method is inherited from Handler and so does nothing, so an explicit flush() call may be needed at times. " Actually, before reading the manual I tried del streamHandler_on_my_stream; my_stream.close() which didn't fix subsequent log messages that reported failure writing to closed stream. __del__ might be easy to implement, and it seems natural. Respectfully, Dave ---------- assignee: georg.brandl components: Documentation messages: 72191 nosy: LambertDW, georg.brandl severity: normal status: open title: logging.Handler.close does something versions: Python 2.5, Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3738> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com