]> granicus.if.org Git - python/commitdiff
Change to improve speed of _fixupChildren
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 31 Oct 2006 17:32:37 +0000 (17:32 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Tue, 31 Oct 2006 17:32:37 +0000 (17:32 +0000)
Lib/logging/__init__.py

index 71efbd67fb8d78fd6097c1961e92662c82c673a7..c72730843e46af01e1c7e94a8f671a43c8f401a8 100644 (file)
@@ -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