diff options
Diffstat (limited to 'Lib/logging/config.py')
-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 5afdf9f..52797ce 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -226,14 +226,14 @@ def _install_loggers(cp, handlers, disable_existing): propagate = section.getint("propagate", fallback=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 section: level = section["level"] |