This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author LambertDW
Recipients LambertDW, georg.brandl
Date 2008-08-30.12:13:12
SpamBayes Score 8.4562043e-07
Marked as misclassified No
Message-id <1220098393.98.0.954077896829.issue3738@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2008-08-30 12:13:14LambertDWsetrecipients: + LambertDW, georg.brandl
2008-08-30 12:13:13LambertDWsetmessageid: <1220098393.98.0.954077896829.issue3738@psf.upfronthosting.co.za>
2008-08-30 12:13:13LambertDWlinkissue3738 messages
2008-08-30 12:13:12LambertDWcreate