]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (GH-4044...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 19 Oct 2017 18:11:49 +0000 (11:11 -0700)
committerMariatta <Mariatta@users.noreply.github.com>
Thu, 19 Oct 2017 18:11:49 +0000 (11:11 -0700)
commit4d9a8f22999de489ede9216ff983d4359d837760
tree1f30bcc8bb578060e25ee273edd07dcb61359102
parent537ed75291ed8a640887f199f98e2e5076ef87b6
bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (GH-4044) (GH-4050)

This used to be the case on Python 2.  Commit
212b590e118e3650b596917021ed9612a918180b 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 ce9e62544571e7ade7186697d5dd065fb4c5243f)
Lib/logging/__init__.py
Lib/test/test_logging.py
Misc/NEWS.d/next/Library/2017-10-18-19-05-17.bpo-31457.KlE6r8.rst [new file with mode: 0644]