Message51366
Pertaining to the FileHandler and the file being written to:
It's possible that the file being written to will be
rolled-over by an external application such as newsyslog.
By default, FileHandler tracks the file descriptor,
not the file. If the original file is renamed, the file
descriptor is still updated; however, it's probably
desired that continued updates to the original file take
place instead.
This patch adds an attribute to the FileHandler class
constructor (and basicConfig kw as well). If the
attribute evaluates to True, the filename, not the
descriptor is tracked. Basically, the code compares the
file status from a previous emit call to the current call
before the base class emit is called. If a difference in
st_ino or st_dev is found, the current stream is
flush/closed and a new one, based on baseFilename, is
created, file status is updated, and then the base class
emit is called.
|
|
Date |
User |
Action |
Args |
2007-08-23 15:55:21 | admin | link | issue1598415 messages |
2007-08-23 15:55:21 | admin | create | |
|