diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-03-07 15:02:11 +0000 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-03-07 15:02:11 +0000 |
commit | 8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101 (patch) | |
tree | ff279cf724c8302b83bedf6cdea21a9b5658ced2 /Lib/logging | |
parent | df8e75ed5a48860afd87dee7cb7a42286703245f (diff) | |
download | cpython-git-8dd2a40bc7feb3b3c2213ed9b7ea7a5bd58ff101.tar.gz |
Issue #11424: Fix bug in determining child loggers.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/config.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/logging/config.py b/Lib/logging/config.py index eb2c2484e2..2881e3fb34 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -232,14 +232,14 @@ def _install_loggers(cp, handlers, disable_existing_loggers): propagate = 1 logger = logging.getLogger(qn) if qn in existing: - i = existing.index(qn) + i = existing.index(qn) + 1 # start with the entry after qn prefixed = qn + "." pflen = len(prefixed) num_existing = len(existing) - i = i + 1 # look at the entry after qn - while (i < num_existing) and (existing[i][:pflen] == prefixed): - child_loggers.append(existing[i]) - i = i + 1 + while i < num_existing: + if existing[i][:pflen] == prefixed: + child_loggers.append(existing[i]) + i += 1 existing.remove(qn) if "level" in opts: level = cp.get(sectname, "level") |