-
-
Couldn't load subscription status.
- Fork 33.3k
Closed as not planned
Closed as not planned
Copy link
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
import logging
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.NullHandler())
logging.basicConfig() # set formatter and handler for root logger(WARNING level)
logger.debug("This is a debug message") # Should this be logged?As title, if I logged a message with matching level on the child logger, the message will also be propagated to the parent, even if the parent logger has a higher level configured.
Actual Result
DEBUG:__main__:This is a debug message
Output log from the root logger.
Expected Result
The message should not be printed since root logger has WARNING level
CPython versions tested on:
3.14
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done