[Python-checkins] r52555 - python/trunk/Lib/logging/__init__.py

vinay.sajip python-checkins at python.org
Tue Oct 31 18:32:37 CET 2006


Author: vinay.sajip
Date: Tue Oct 31 18:32:37 2006
New Revision: 52555
Modified:
 python/trunk/Lib/logging/__init__.py
Log:
Change to improve speed of _fixupChildren
Modified: python/trunk/Lib/logging/__init__.py
==============================================================================
--- python/trunk/Lib/logging/__init__.py	(original)
+++ python/trunk/Lib/logging/__init__.py	Tue Oct 31 18:32:37 2006
@@ -910,9 +910,12 @@
 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
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /