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.

Title: RotatingFileHandler and TimedRotatingFileHandler do not respect delay on rollover
Type: Stage: resolved
Components: Versions:
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, solarmist, vinay.sajip
Priority: normal Keywords: patch

Created on 2013-09-05 23:56 by solarmist, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit solarmist, 2013-09-06 01:56 Code to demonstrate the bug
delay_rollover.patch solarmist, 2013-09-06 01:56 Patch for rolling over with delay set
Messages (4)
msg197036 - (view) Author: Joshua Olson (solarmist) * Date: 2013-09-05 23:56
For low volume loggers RotatingFileHandler and TimedRotatingFileHandler will create possibly unnecessary files on doRollover, since they don't check the value of delay when opening the new = self._open()

should be something like

if not self.delay: = self._open()
msg197042 - (view) Author: Joshua Olson (solarmist) * Date: 2013-09-06 01:56
Demonstrate the bug
msg197043 - (view) Author: Joshua Olson (solarmist) * Date: 2013-09-06 01:56
If delay is set then don't automatically open the new file.
msg197061 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-06 09:27
New changeset 4d45f1ed1179 by Vinay Sajip in branch '2.7':
Issue #18941: Respected delay when doing rollover.

New changeset 0577c9a82c0a by Vinay Sajip in branch '3.3':
Issue #18941: Respected delay when doing rollover.

New changeset 7627fea85a6d by Vinay Sajip in branch 'default':
Closes #18941: Merged fix from 3.3.
Date User Action Args
2022-04-11 14:57:50adminsetgithub: 63141
2013-09-06 09:27:03python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg197061

resolution: fixed
stage: resolved
2013-09-06 02:43:00r.david.murraysetnosy: + vinay.sajip
2013-09-06 01:56:46solarmistsetfiles: + delay_rollover.patch
keywords: + patch
messages: + msg197043
2013-09-06 01:56:06solarmistsetfiles: +

messages: + msg197042
2013-09-05 23:56:08solarmistcreate