-
Notifications
You must be signed in to change notification settings - Fork 1.6k
only configure the requested logger, not the root logger #2746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR also changes the type of the log level setting. Currently, it uses the integer-based level. However, when the env var |
pplantinga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, this is a good fix. Very minor comment is the added info in the docstring but can be merged just fine without it.
…et logged to the log file. Console remains at INFO
|
Thank you for the review! Glad to get this merged |
What does this PR do?
#2682 introduced new log handling.
get_logger()was callinglogging.basicConfig()and setting the log-level for the root logger which interfered with user-configured logging.This PR changes it so that
get_logger()only sets the log level for the requested logger usingLogger.setLevel()Breaking changes:
default_levelofsetup_logging()now expects a string, not an integerBefore submitting
PR review
Reviewer checklist