Message72191
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 |
|
Date |
User |
Action |
Args |
2008-08-30 12:13:14 | LambertDW | set | recipients:
+ LambertDW, georg.brandl |
2008-08-30 12:13:13 | LambertDW | set | messageid: <1220098393.98.0.954077896829.issue3738@psf.upfronthosting.co.za> |
2008-08-30 12:13:13 | LambertDW | link | issue3738 messages |
2008-08-30 12:13:12 | LambertDW | create | |
|