gh-93205: When rotating logs with no namer specified, match whole extension#93224
Conversation
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM.
I agree that it is better to separate simpler case with no namer, where the matches can be found unambiguous and more efficiently from more complex case with helper.
It is still not completely unambiguous and can conflict with other TimedRotatingFileHandler with a namer that simply adds an extension, but I'm going to fix this in other issue.
|
Thanks @ilCatania for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…le extension (pythonGH-93224) (cherry picked from commit 113687a) Co-authored-by: Gabriele Catania <gabriele.ctn@gmail.com>
|
GH-115784 is a backport of this pull request to the 3.12 branch. |
…le extension (pythonGH-93224) (cherry picked from commit 113687a) Co-authored-by: Gabriele Catania <gabriele.ctn@gmail.com>
|
GH-115785 is a backport of this pull request to the 3.11 branch. |
Fixes GH-93205: When setting up multiple logging handlers of type
TimedRotatingFileHandlerthat log to the same directory and only differ by the file extension, rollover does not work properly for either of them.There have been a few changes in
TimeRotatingHandler(GH-90221, GH-89791) due to different file format expectations when a namer is specified versus not specified. This PR fixes the issue in GH-93205 while trying to simplify the code.