Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fbcfe76

Browse filesBrowse files
authored
Merge pull request #10734 from gregorybchris/master
Fix logging level type
2 parents fa2a0d6 + df2aacf commit fbcfe76
Copy full SHA for fbcfe76

File tree

Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-3
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def ge(self, level):
391391
return self.vald[self.level] >= self.vald[level]
392392

393393

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

407407
if (always or not wrapper._spoke):
408-
lvl = logging.getLevelName(level.upper())
409-
_log.log(lvl, fmt % ret)
408+
_log.log(level, fmt % ret)
410409
spoke = True
411410
if not wrapper._spoke:
412411
wrapper._spoke = spoke

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.