mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
#Issue 11424: merged fix from 2.6.
This commit is contained in:
commit
44b740ff28
2 changed files with 118 additions and 5 deletions
|
@ -226,14 +226,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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue