Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a900fc

Browse files
authored
Merge pull request #10743 from matplotlib/auto-backport-of-pr-10734
Backport PR #10734 on branch v2.2.x
2 parents 6c2abc5 + ba6ddcb commit 8a900fc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def ge(self, level):
382382
return self.vald[self.level] >= self.vald[level]
383383

384384

385-
def _wrap(fmt, func, level='DEBUG', always=True):
385+
def _wrap(fmt, func, level=logging.DEBUG, always=True):
386386
"""
387387
return a callable function that wraps func and reports its
388388
output through logger
@@ -396,8 +396,7 @@ def wrapper(*args, **kwargs):
396396
ret = func(*args, **kwargs)
397397

398398
if (always or not wrapper._spoke):
399-
lvl = logging.getLevelName(level.upper())
400-
_log.log(lvl, fmt % ret)
399+
_log.log(level, fmt % ret)
401400
spoke = True
402401
if not wrapper._spoke:
403402
wrapper._spoke = spoke

0 commit comments

Comments
 (0)