-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
Hello,
I just got surprised by a behavior of the logging module where a call to logging.debug() (or any level) will call basicConfig() if no handler is set on the root logger but a call to Logger.debug() won't.
This issue was already discussed on #79711 and therefore, I would not discuss the behavior itself. Rather, I am wondering if the documentation displays this behavior enough. I agree that it is documented, but I think this is still misleading because:
- the behavior is documented in a paragraph in the middle of the Advanced Logging Tutorial
- A paragraph named "What happens if no configuration is provided" explains how logging.lastResort is used but makes no mention of
basicConfig()being called bylogging.debug() - the call to basicConfig() isn't described on the documentation of logging.debug() itself.
If people agree that this is an issue, I would propose that I make a PR to add a paragraph to logging.debug() to describe the behavior.
Let me know what you think!
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Projects
Status
Done