Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-35722: Specify in the docs that disable_existing_loggers does not affect the root logger #11525

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

Merged
merged 3 commits into from
Jan 23, 2019

Conversation

geryogam
Copy link
Contributor

@geryogam geryogam commented Jan 11, 2019

In the package logging, the parameter disable_existing_loggers used in the functions logging.config.dictConfig and logging.config.fileConfig does not affect the root logger. More precisely, calling those functions with the parameter disable_existing_loggers set to True or False leaves the attribute disabled of the root logger unchanged (while it sets it to True for non-root loggers). So it is either a bug or the documentation should be updated. This PR updates the documentation.

Illustration:

import logging.config

assert logging.getLogger().disabled is False
assert logging.getLogger("foo").disabled is False

logging.config.dictConfig({"version": 1})

assert logging.getLogger().disabled is False
assert logging.getLogger("foo").disabled is True

https://bugs.python.org/issue35722

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir awaiting review labels Jan 11, 2019
@geryogam geryogam changed the title Update the documentation for the parameter disable_existing_loggers bpo-35722: Update the documentation for the parameter disable_existing_loggers Jan 11, 2019
Removed an unrelated change.
@miss-islington
Copy link
Contributor

Thanks @maggyero for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @maggyero for the PR, and @vsajip for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 23, 2019
…s' parameter (pythonGH-11525)

(cherry picked from commit f0c7436)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
@bedevere-bot
Copy link

GH-11655 is a backport of this pull request to the 3.7 branch.

@bedevere-bot
Copy link

GH-11656 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 23, 2019
…s' parameter (pythonGH-11525)

(cherry picked from commit f0c7436)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
vsajip pushed a commit that referenced this pull request Jan 23, 2019
…s' parameter (GH-11525) (GH-11655)

(cherry picked from commit f0c7436)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
@geryogam geryogam deleted the patch-5 branch January 23, 2019 10:48
@geryogam geryogam changed the title bpo-35722: Update the documentation for the parameter disable_existing_loggers bpo-35722: Specify in the docs that disable_existing_loggers does not affect the root logger Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.