This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect propagation in logging.wheb creating lighters in a certain order
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Tal Kogan, vinay.sajip
Priority: normal Keywords:

Created on 2017-06-06 13:53 by Tal Kogan, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg295262 - (view) Author: Tal Kogan (Tal Kogan) Date: 2017-06-06 13:53
Creating a logger at level 3 and below and then creating a logger at level 1 will not correctly set the parent logger for the 3rd level logger. 

import logging
log_c = logging.getLogger('a.b.c')
log_a = logging.getLogger('a')
log_c.error("spam") # Doesn't showa
msg295268 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2017-06-06 15:43
You haven't clearly stated what you expect to happen vs. what happens. I don't believe there is a bug here:

$ python3.6
Python 3.6.1+ (heads/3.6:2ee91c8, May 28 2017, 14:14:12) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> log_c = logging.getLogger('a.b.c')
>>> log_a = logging.getLogger('a')
>>> log_c.error('spam')
spam
>>> 

This behaviour is as expected.
History
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74767
2017-06-06 15:43:53vinay.sajipsetstatus: open -> closed
resolution: not a bug
messages: + msg295268

stage: resolved
2017-06-06 14:08:17ned.deilysetnosy: + vinay.sajip
2017-06-06 13:53:30Tal Kogancreate