[New-bugs-announce] [issue46063] TimedRotatingFileHandler deletes wrong files

Sami Salonen report at bugs.python.org
Mon Dec 13 07:12:03 EST 2021


New submission from Sami Salonen <sersei at gmail.com>:

https://bugs.python.org/issue45628 breaks file rotation.

I name my log files after module name, run the modules in separate processes, use the same log config in them, and store the log files in one common directory. For example, for modules `a.b` and `a.b.c` I have the following log files:

a.b.log
a.b.c.log

Now after bpo-45628 fix, `getFilesToDelete` treats the rotated log files from those modules the same, and deletes wrong files. If `backupCount` is set to e.g. 7, only total of 7 files are stored instead of 7 of each.

----------
components: Library (Lib)
messages: 408445
nosy: Sami Salonen
priority: normal
severity: normal
status: open
title: TimedRotatingFileHandler deletes wrong files
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46063>
_______________________________________


More information about the New-bugs-announce mailing list