bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093)#30093
Merged
vsajip merged 2 commits intopython:mainfrom Dec 14, 2021
Merged
bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093)#30093vsajip merged 2 commits intopython:mainfrom
vsajip merged 2 commits intopython:mainfrom
Conversation
iritkatriel
reviewed
Dec 13, 2021
Lib/test/test_logging.py
Outdated
| rotator.namer = lambda name: name.replace('.log', '') + '.log' | ||
| for t in times: | ||
| files.append('%s.%s.log' % (prefix, t)) | ||
| # Open empty files |
Member
There was a problem hiding this comment.
Suggested change
| # Open empty files | |
| # Create empty files |
iritkatriel
reviewed
Dec 14, 2021
Lib/logging/handlers.py
Outdated
| # Our files could be just about anything after custom naming, but | ||
| # likely candidates are of the form | ||
| # foo.log.DATETIME_SUFFIX or foo.DATETIME_SUFFIX.log | ||
| if not fileName.startswith(baseName) and fileName.endswith(e) and len(fileName) > (plen + 1) and not fileName[plen+1].isdigit(): |
Member
There was a problem hiding this comment.
This is a very long line, I don't know if you follow PEP 8 here.
Member
Author
There was a problem hiding this comment.
I'll shorten it by wrapping over successive lines.
iritkatriel
approved these changes
Dec 14, 2021
Member
Author
|
Thanks for the review. |
Member
Author
Yes, that's done (briefly, but I think sufficiently) in the API documentation for |
Contributor
|
Thanks @vsajip for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 14, 2021
pythonGH-30093) (cherry picked from commit cb589d1) Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
|
GH-30094 is a backport of this pull request to the 3.10 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Dec 14, 2021
pythonGH-30093) (cherry picked from commit cb589d1) Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
|
GH-30095 is a backport of this pull request to the 3.9 branch. |
vsajip
added a commit
that referenced
this pull request
Dec 14, 2021
vsajip
pushed a commit
that referenced
this pull request
Dec 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…s to delete.
https://bugs.python.org/issue46063