summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/__init__.py28
-rw-r--r--Lib/logging/config.py2
2 files changed, 15 insertions, 15 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index d82d667..862f7ca 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -965,7 +965,7 @@ class Logger(Filterer):
if self.manager.disable >= DEBUG:
return
if DEBUG >= self.getEffectiveLevel():
- apply(self._log, (DEBUG, msg, args), kwargs)
+ self._log(DEBUG, msg, args, **kwargs)
def info(self, msg, *args, **kwargs):
"""
@@ -979,7 +979,7 @@ class Logger(Filterer):
if self.manager.disable >= INFO:
return
if INFO >= self.getEffectiveLevel():
- apply(self._log, (INFO, msg, args), kwargs)
+ self._log(INFO, msg, args, **kwargs)
def warning(self, msg, *args, **kwargs):
"""
@@ -993,7 +993,7 @@ class Logger(Filterer):
if self.manager.disable >= WARNING:
return
if self.isEnabledFor(WARNING):
- apply(self._log, (WARNING, msg, args), kwargs)
+ self._log(WARNING, msg, args, **kwargs)
warn = warning
@@ -1009,13 +1009,13 @@ class Logger(Filterer):
if self.manager.disable >= ERROR:
return
if self.isEnabledFor(ERROR):
- apply(self._log, (ERROR, msg, args), kwargs)
+ self._log(ERROR, msg, args, **kwargs)
def exception(self, msg, *args):
"""
Convenience method for logging an ERROR with exception information.
"""
- apply(self.error, (msg,) + args, {'exc_info': 1})
+ self.error(msg, *args, exc_info=1)
def critical(self, msg, *args, **kwargs):
"""
@@ -1029,7 +1029,7 @@ class Logger(Filterer):
if self.manager.disable >= CRITICAL:
return
if CRITICAL >= self.getEffectiveLevel():
- apply(self._log, (CRITICAL, msg, args), kwargs)
+ self._log(CRITICAL, msg, args, **kwargs)
fatal = critical
@@ -1050,7 +1050,7 @@ class Logger(Filterer):
if self.manager.disable >= level:
return
if self.isEnabledFor(level):
- apply(self._log, (level, msg, args), kwargs)
+ self._log(level, msg, args, **kwargs)
def findCaller(self):
"""
@@ -1275,7 +1275,7 @@ def critical(msg, *args, **kwargs):
"""
if len(root.handlers) == 0:
basicConfig()
- apply(root.critical, (msg,)+args, kwargs)
+ root.critical(msg, *args, **kwargs)
fatal = critical
@@ -1285,14 +1285,14 @@ def error(msg, *args, **kwargs):
"""
if len(root.handlers) == 0:
basicConfig()
- apply(root.error, (msg,)+args, kwargs)
+ root.error(msg, *args, **kwargs)
def exception(msg, *args):
"""
Log a message with severity 'ERROR' on the root logger,
with exception information.
"""
- apply(error, (msg,)+args, {'exc_info': 1})
+ error(msg, *args, exc_info=1)
def warning(msg, *args, **kwargs):
"""
@@ -1300,7 +1300,7 @@ def warning(msg, *args, **kwargs):
"""
if len(root.handlers) == 0:
basicConfig()
- apply(root.warning, (msg,)+args, kwargs)
+ root.warning(msg, *args, **kwargs)
warn = warning
@@ -1310,7 +1310,7 @@ def info(msg, *args, **kwargs):
"""
if len(root.handlers) == 0:
basicConfig()
- apply(root.info, (msg,)+args, kwargs)
+ root.info(msg, *args, **kwargs)
def debug(msg, *args, **kwargs):
"""
@@ -1318,7 +1318,7 @@ def debug(msg, *args, **kwargs):
"""
if len(root.handlers) == 0:
basicConfig()
- apply(root.debug, (msg,)+args, kwargs)
+ root.debug(msg, *args, **kwargs)
def log(level, msg, *args, **kwargs):
"""
@@ -1326,7 +1326,7 @@ def log(level, msg, *args, **kwargs):
"""
if len(root.handlers) == 0:
basicConfig()
- apply(root.log, (level, msg)+args, kwargs)
+ root.log(level, msg, *args, **kwargs)
def disable(level):
"""
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 5adfe4d..457ec5c 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -148,7 +148,7 @@ def _install_handlers(cp, formatters):
klass = eval(klass, vars(logging))
args = cp.get(sectname, "args")
args = eval(args, vars(logging))
- h = apply(klass, args)
+ h = klass(*args)
if "level" in opts:
level = cp.get(sectname, "level")
h.setLevel(logging._levelNames[level])