New submission from Richard Jones:
The RotatingFileHandler classes force the open() mode of the new log file to be
"w" even though it is initially defaulted to "a" in doRollover() methods:
self.mode = 'w'
self.stream = self._open()
This can cause problems in systems that have multiple programs writing to the
log file; they can both end up opening the new file in "w" mode and then
there's loss of data.
I cannot think of a reason why "w" should be forced in this manner.
The fix is to remove the "self.mode = 'w'" line from the two doRollover()
methods.
----------
components: Library (Lib)
messages: 173016
nosy: richard
priority: normal
severity: normal
status: open
title: TimedRotatingFileHandler forces "write" mode, should use "append"
type: behavior
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16244>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com