summaryrefslogtreecommitdiffstats
path: root/Lib/logging/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging/__init__.py')
-rw-r--r--Lib/logging/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 953afe9..b57a9af 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -214,7 +214,7 @@ class LogRecord:
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,10 +910,11 @@ 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():
- # XXX Is the following correct? Shouldn't it be >= 0?
- if string.find(c.parent.name, alogger.name) != 0:
+ #The if means ... if not c.parent.name.startswith(nm)
+ if c.parent.name[:namelen] != name:
alogger.parent = c.parent
c.parent = alogger