8000 ENH: set level to INFO and add pyplot.debug() · matplotlib/matplotlib@d738837 · GitHub
[go: up one dir, main page]

Skip to content

Commit d738837

Browse files
committed
ENH: set level to INFO and add pyplot.debug()
1 parent 1bcf4f4 commit d738837

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

lib/matplotlib/pyplot.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,15 +1997,15 @@ def colormaps():
19971997
return sorted(cm.cmap_d)
19981998

19991999

2000-
def verbose(level='debug'):
2000+
def verbose(level='info'):
20012001
"""
20022002
Shortcut to set the debugging level of the logging module.
20032003
20042004
Parameters
20052005
----------
2006-
level : str or bool
2007-
If True set logging level to "DEBUG" for matplotlib module.
2008-
If FALSE set logging level to "WARNING" for matplotlib module (this
2006+
level : str or bool (optional)
2007+
If *True* (default) set logging level to "INFO" for matplotlib module.
2008+
If *False* set logging level to "WARNING" for matplotlib module (this
20092009
is the default level if ``verbose`` is not called). If a string, must
20102010
be one of ['warning', 'info', 'debug'], in order of increasing
20112011
verbosity.
@@ -2023,6 +2023,23 @@ def verbose(level='debug'):
20232023
matplotlib.verbose(level=level)
20242024

20252025

2026+
def debug():
2027+
"""
2028+
Shortcut to set the debugging level of the logging module to DEBUG
2029+
2030+
Notes
2031+
-----
2032+
This is the same as the standard python `logging` module::
2033+
2034+
import logging
2035+
2036+
_log = logging.getLogger(__name__)
2037+
_log.setLevel(logging.DEBUG)
2038+
2039+
"""
2040+
matplotlib.verbose(level='debug')
2041+
2042+
20262043
def _setup_pyplot_info_docstrings():
20272044
"""
20282045
Generates the plotting docstring.

0 commit comments

Comments
 (0)
0