Skip to content

logging: Surprising call to basicConfig() #92859

@Gaasmann

Description

@Gaasmann

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:

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

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions