From ef7f3bf3b306cf8702496cb8ac2c7afdcf1b2fdb Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 31 Oct 2006 17:32:37 +0000 Subject: Change to improve speed of _fixupChildren --- Lib/logging/__init__.py | 7 +++++-- 1 file 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 -- cgit v0.12