From c03380bba48b97e2613166f211ad1f5be78975fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Thu, 19 Oct 2017 10:24:55 -0700 Subject: [PATCH] bpo-31457: Don't omit inner ``process()`` calls with nested LogAdapters (GH-4044) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) Co-authored-by: Ɓukasz Langa --- .../next/Library/2017-10-18-19-05-17.bpo-31457.KlE6r8.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2017-10-18-19-05-17.bpo-31457.KlE6r8.rst diff --git a/Misc/NEWS.d/next/Library/2017-10-18-19-05-17.bpo-31457.KlE6r8.rst b/Misc/NEWS.d/next/Library/2017-10-18-19-05-17.bpo-31457.KlE6r8.rst new file mode 100644 index 000000000000000..49463c4fd15b4e0 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2017-10-18-19-05-17.bpo-31457.KlE6r8.rst @@ -0,0 +1,2 @@ +If nested log adapters are used, the inner ``process()`` methods are no +longer omitted.