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 richard
Recipients richard
Date 2012-10-16.05:05:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1350363937.05.0.667982982296.issue16244@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-10-16 05:05:37richardsetrecipients: + richard
2012-10-16 05:05:37richardsetmessageid: <1350363937.05.0.667982982296.issue16244@psf.upfronthosting.co.za>
2012-10-16 05:05:36richardlinkissue16244 messages
2012-10-16 05:05:36richardcreate