[Python-checkins] r53298 - python/branches/release25-maint/Lib/logging/__init__.py
vinay.sajip
python-checkins at python.org
Mon Jan 8 11:12:29 CET 2007
Author: vinay.sajip
Date: Mon Jan 8 11:12:29 2007
New Revision: 53298
Modified:
python/branches/release25-maint/Lib/logging/__init__.py
Log:
Backported changes from trunk:
Made func argument in LogRecord.__init__ optional.
Improved performance of _fixupChildren.
Modified: python/branches/release25-maint/Lib/logging/__init__.py
==============================================================================
--- python/branches/release25-maint/Lib/logging/__init__.py (original)
+++ python/branches/release25-maint/Lib/logging/__init__.py Mon Jan 8 11:12:29 2007
@@ -214,7 +214,7 @@
information to be logged.
"""
def __init__(self, name, level, pathname, lineno,
- msg, args, exc_info, func):
+ msg, args, exc_info, func=None):
"""
Initialize a logging record with interesting information.
"""
@@ -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