-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-76913: Add "merge extras" feature to LoggerAdapter #107292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm aware that the documentation / news were not updated. Waiting for some approval on the proposal first |
b7fae18
to
3ebace6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see suggested changes, and add documentation and NEWS changes. Thanks!
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
8221e75
to
92b6254
Compare
I have made the requested changes; please review again |
Thanks for making the requested changes! @vsajip: please review the changes made to this pull request. |
(I did rewrite my commit I'm not sure what's the usual way is) |
I don't see any sign of the changes I suggested. The normal way to do it is to make the changes and push again to your fork/branch. This will generate a new diff, but as you can see the current diff looks just like the previous diff. Check the Python Developer's Guide if you need more help on creating and iterating pull requests. |
I've made the code changes (visible in the PR for me) but missed the part about the NEWS and doc. I'll work on this next |
Well, it's not visible to me. See this screenshot: Note that it's showing "Changes from all commits" but only a commit count of 1, where I would have expected at least two commits (the initial commit, and one or more for your changes after my review). Also note that I made a review comment suggesting |
@vsajip thanks for the clarification. I've used a push -f to squash all changes, I'm guessing this is why it's only showing as one change I'll try to recover this if I can access the previous state I also missed the name change by reading too fast |
By default, LoggerAdapter objects ignores all `extra=` parameter used in the individual log methods, which may be confusing for some users. This commit is aimed at adding an option in the LoggerAdapter class to allow instances / subclasses to merge both the adapter and individual log call extra into a single entry The default behavior is not changed For example: ``` log = LoggerAdapter(..., extra={"component": "XYZ"}) log.info("return %r" % ret, extra={"duration": elapsed}) ```
92b6254
to
65dcfcf
Compare
Don't squash on push. We generally squash on merge, and reviewers need to see the whole commit history (initial, and after every review or noticed change) when reviewing. |
I have made the requested changes; please review again |
Thanks for making the requested changes! @vsajip: please review the changes made to this pull request. |
A seemingly unrelated test is failing, so I'll close and reopen this PR to see if that resolves it. |
|
By default, LoggerAdapter objects ignores all
extra=
parameter used in the individual log methods, which may be confusing for some users.This commit is aimed at adding an option in the LoggerAdapter class to allow instances / subclasses to merge both the adapter and individual log call extra into a single entry
The default behavior is not changed
For example: