summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2019-08-02 15:53:00 (GMT)
committerGitHub <noreply@github.com>2019-08-02 15:53:00 (GMT)
commitcb65b3a4f484ce71dcb76a918af98c7015513025 (patch)
tree7f4e08a9ed98315e4fe5d0651f9344271db928a2 /Misc
parent854d0a4b98b13629252e21edaf2b785b429e5135 (diff)
downloadcpython-cb65b3a4f484ce71dcb76a918af98c7015513025.zip
cpython-cb65b3a4f484ce71dcb76a918af98c7015513025.tar.gz
cpython-cb65b3a4f484ce71dcb76a918af98c7015513025.tar.bz2
bpo-37742: Return the root logger when logging.getLogger('root') is c… (#15077)
* bpo-37742: Return the root logger when logging.getLogger('root') is called. * Added type check guard on logger name in logging.getLogger() and refined a test.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-08-02-14-01-25.bpo-37742.f4Xn9S.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-08-02-14-01-25.bpo-37742.f4Xn9S.rst b/Misc/NEWS.d/next/Library/2019-08-02-14-01-25.bpo-37742.f4Xn9S.rst
new file mode 100644
index 0000000..300ced3
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-08-02-14-01-25.bpo-37742.f4Xn9S.rst
@@ -0,0 +1,5 @@
+The logging.getLogger() API now returns the root logger when passed the name
+'root', whereas previously it returned a non-root logger named 'root'. This
+could affect cases where user code explicitly wants a non-root logger named
+'root', or instantiates a logger using logging.getLogger(__name__) in some
+top-level module called 'root.py'.