summaryrefslogtreecommitdiff
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 94361ca75f..265e286101 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -194,7 +194,8 @@ def _checkLevel(level):
raise ValueError("Unknown level: %r" % level)
rv = _nameToLevel[level]
else:
- raise TypeError("Level not an integer or a valid string: %r" % level)
+ raise TypeError("Level not an integer or a valid string: %r"
+ % (level,))
return rv
#---------------------------------------------------------------------------
@@ -522,7 +523,7 @@ class Formatter(object):
responsible for converting a LogRecord to (usually) a string which can
be interpreted by either a human or an external system. The base Formatter
allows a formatting string to be specified. If none is supplied, the
- the style-dependent default value, "%(message)s", "{message}", or
+ style-dependent default value, "%(message)s", "{message}", or
"${message}", is used.
The Formatter can be initialized with a format string which makes use of
@@ -762,8 +763,8 @@ class Filter(object):
"""
Determine if the specified record is to be logged.
- Is the specified record to be logged? Returns 0 for no, nonzero for
- yes. If deemed appropriate, the record may be modified in-place.
+ Returns True if the record should be logged, or False otherwise.
+ If deemed appropriate, the record may be modified in-place.
"""
if self.nlen == 0:
return True