Skip to content

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

Merged
ambv merged 1 commit into
python:3.6from
miss-islington:backport-ce9e625-3.6
Apr 22, 2018
Merged

[3.6] bpo-31457: Don't omit inner process() calls with nested LogAdapters (GH-4044)#6568
ambv merged 1 commit into
python:3.6from
miss-islington:backport-ce9e625-3.6

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

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 lukasz@langa.pl

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 <lukasz@langa.pl>
@miss-islington

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Thanks, @ambv!

@bedevere-bot

Copy link
Copy Markdown

@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