mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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.
This commit is contained in:
parent
854d0a4b98
commit
cb65b3a4f4
3 changed files with 8 additions and 3 deletions
|
@ -4856,6 +4856,7 @@ class LoggerTest(BaseTest):
|
|||
self.assertIs(root, logging.root)
|
||||
self.assertIs(root, logging.getLogger(None))
|
||||
self.assertIs(root, logging.getLogger(''))
|
||||
self.assertIs(root, logging.getLogger('root'))
|
||||
self.assertIs(root, logging.getLogger('foo').root)
|
||||
self.assertIs(root, logging.getLogger('foo.bar').root)
|
||||
self.assertIs(root, logging.getLogger('foo').parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue