summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2006-10-31 17:32:37 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2006-10-31 17:32:37 (GMT)
commitef7f3bf3b306cf8702496cb8ac2c7afdcf1b2fdb (patch)
treecdf13b3a1468ebcf2dec2c34166a2ec3ba91a317
parent1ead69849486321bd46ae2750da0b32c199d7322 (diff)
downloadcpython-ef7f3bf3b306cf8702496cb8ac2c7afdcf1b2fdb.zip
cpython-ef7f3bf3b306cf8702496cb8ac2c7afdcf1b2fdb.tar.gz
cpython-ef7f3bf3b306cf8702496cb8ac2c7afdcf1b2fdb.tar.bz2
Change to improve speed of _fixupChildren
-rw-r--r--Lib/logging/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 71efbd6..c727308 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -910,9 +910,12 @@ class Manager:
Ensure that children of the placeholder ph are connected to the
specified logger.
"""
- #for c in ph.loggers:
+ name = alogger.name
+ namelen = len(name)
for c in ph.loggerMap.keys():
- if string.find(c.parent.name, alogger.name) <> 0:
+ #The if means ... if not c.parent.name.startswith(nm)
+ #if string.find(c.parent.name, nm) <> 0:
+ if c.parent.name[:namelen] != name:
alogger.parent = c.parent
c.parent = alogger