Skip to content

[3.6] bpo-31457: Don't omit inner process() calls with nested LogAdapters (GH-4044) #6568

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

Merged
merged 1 commit into from
Apr 22, 2018

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Apr 22, 2018

This used to be the case on Python 2. Commit
212b590 changed the implementation for Python
3, making the log() method of LogAdapter call logger._log() directly. This
makes nested log adapters not execute their process() method. This patch
fixes the issue.

Also, now proxying name, too, to make repr() work with nested log adapters.

New tests added.
(cherry picked from commit ce9e625)

Co-authored-by: Łukasz Langa [email protected]

https://bugs.python.org/issue31457

…rs (pythonGH-4044)

This used to be the case on Python 2.  Commit
212b590 changed the implementation for Python
3, making the `log()` method of LogAdapter call `logger._log()` directly.  This
makes nested log adapters not execute their ``process()`` method.  This patch
fixes the issue.

Also, now proxying `name`, too, to make `repr()` work with nested log adapters.

New tests added.
(cherry picked from commit ce9e625)

Co-authored-by: Łukasz Langa <[email protected]>
@miss-islington
Copy link
Contributor Author

@ambv: Backport status check is done, and it's a success ✅ .

@ambv ambv merged commit 26c289d into python:3.6 Apr 22, 2018
@miss-islington
Copy link
Contributor Author

Thanks, @ambv!

@bedevere-bot
Copy link

@ambv: Please replace # with GH- in the commit message next time. Thanks!

@miss-islington miss-islington deleted the backport-ce9e625-3.6 branch April 22, 2018 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants