This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: disable_existing_loggers does not apply to the root logger
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.araujo, ezio.melotti, maggyero, mdk, vinay.sajip, willingc
Priority: normal Keywords: patch, patch, patch, patch, patch

Created on 2019-01-11 19:32 by maggyero, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11525 merged maggyero, 2019-01-11 19:32
PR 11655 merged miss-islington, 2019-01-23 07:13
PR 11656 closed miss-islington, 2019-01-23 07:13
Messages (3)
msg333502 - (view) Author: Géry (maggyero) * Date: 2019-01-11 19:32
In the logging package, the parameter disable_existing_loggers used in logging.config.dictConfig and logging.config.fileConfig does not apply to the root logger. More precisely, its disabled attribute remains unchanged (while it is set to True for non-root loggers). So it is either a bug or the documentation should be updated.

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
msg334250 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2019-01-23 07:12
New changeset f0c743604fc841d35a48822b936ef2e5919e43c1 by Vinay Sajip (Géry Ogam) in branch 'master':
bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525)
https://github.com/python/cpython/commit/f0c743604fc841d35a48822b936ef2e5919e43c1
msg334251 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2019-01-23 07:21
New changeset 552478bb1086ef371e4f1da0b430b90eba4785d5 by Vinay Sajip (Miss Islington (bot)) in branch '3.7':
bpo-35722: Updated the documentation for the 'disable_existing_loggers' parameter (GH-11525) (GH-11655)
https://github.com/python/cpython/commit/552478bb1086ef371e4f1da0b430b90eba4785d5
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 79903
2019-01-23 07:24:42vinay.sajipsetkeywords: patch, patch, patch, patch, patch
status: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-01-23 07:23:21vinay.sajipsetpull_requests: - pull_request11449
2019-01-23 07:22:50vinay.sajipsetpull_requests: - pull_request11450
2019-01-23 07:22:32vinay.sajipsetpull_requests: - pull_request11447
2019-01-23 07:22:09vinay.sajipsetpull_requests: - pull_request11446
2019-01-23 07:21:38vinay.sajipsetmessages: + msg334251
2019-01-23 07:14:42miss-islingtonsetkeywords: + patch
pull_requests: + pull_request11448
2019-01-23 07:14:31miss-islingtonsetpull_requests: + pull_request11450
2019-01-23 07:14:22miss-islingtonsetkeywords: + patch
pull_requests: + pull_request11449
2019-01-23 07:14:11miss-islingtonsetkeywords: + patch
pull_requests: + pull_request11447
2019-01-23 07:13:59miss-islingtonsetkeywords: + patch
pull_requests: + pull_request11446
2019-01-23 07:13:46miss-islingtonsetkeywords: + patch
pull_requests: + pull_request11445
2019-01-23 07:12:42vinay.sajipsetmessages: + msg334250
2019-01-20 23:49:17cheryl.sabellasetassignee: docs@python

components: + Documentation, - Library (Lib)
nosy: + docs@python
2019-01-20 23:47:31cheryl.sabellasetstage: patch review
versions: + Python 3.8
2019-01-11 19:32:29maggyerocreate