[New-bugs-announce] [issue46377] TimedRotatingFileHandler "midnight" misleading when interval > 1

Mike Schiessl report at bugs.python.org
Fri Jan 14 08:50:48 EST 2022

New submission from Mike Schiessl <mschiess at akamai.com>:

Using the TimedRotatingFileHandler along with "when='midnight'" and interval > 1, midnight is handled equally to "days" which is a little misleading.

setting when to 'midnight', the file is rotated every midnight (interval value should be ignored)

Current behavior:
If 'midnight' is given alongside with an interval greater than 1 (.e.g 5), the (internal) interval (24*60*60) is calculated with the given interval -> 24*60*60 * 5.

In my case, this led to some unforeseeable and unexpected behavior.

components: Library (Lib)
messages: 410558
nosy: mschiess, vinay.sajip
priority: normal
severity: normal
status: open
title: TimedRotatingFileHandler "midnight" misleading when interval > 1
type: behavior
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list