8000 ENH: change name to set_loglevel · matplotlib/matplotlib@b598ea9 · GitHub
[go: up one dir, main page]

Skip to content

Commit b598ea9

Browse files
committed
ENH: change name to set_loglevel
1 parent f73ccc0 commit b598ea9

File tree

5 files changed

+8
-25
lines changed

5 files changed

+8
-25
lines changed

doc/devel/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ Then they will receive messages like::
451451
More straight forward helper methods are available to end-users as well::
452452

453453
import matplotlib.pyplot as plt
454-
plt.verbose() # or plt.debug()
454+
plt.set_loglevel(level='info') # or plt.set_loglevel(level='debug')
455455

456456
Which logging level to use?
457457
~~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/faq/troubleshooting_faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ provide the following information in your e-mail to the `mailing list
124124
functions::
125125

126126
import matplotlib.pyplot as plt
127-
plt.verbose() # or plt.debug()
127+
plt.set_loglevel(level='info') # or plt.set_loglevel(level='debug')
128128

129129

130130
If you want to put full debugging hooks in your own code, including

doc/users/next_whats_new/pyplot_verbose.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ New methods for verbose logging
44
-------------------------------
55

66
If more debugging information is required, the user can call
7-
the `.pyplot.verbose` or `.pyplot.debug` methods.
7+
the `.pyplot.set_loglevel` method.

lib/matplotlib/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _check_versions():
207207
sys.argv = ['modpython']
208208

209209

210-
def verbose(level='info'):
210+
def set_loglevel(level='info'):
211211
"""
212212
Shortcut to set the logging level of the logging module.
213213
@@ -216,8 +216,8 @@ def verbose(level='info'):
216216
level : str or bool
217217
If True set logging level to "INFO" for matplotlib module.
218218
If FALSE set logging level to "WARNING" for matplotlib module (this
219-
is the default level if ``verbose`` is not called). If a string, must
220-
be one of ['warning', 'info', 'debug'], in order of increasing
219+
is the default level if ``set_loglevel`` is not called). If a string,
220+
must be one of ['warning', 'info', 'debug'], in order of increasing
221221
verbosity.
222222
223223
Notes

lib/matplotlib/pyplot.py

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

19991999

2000-
def verbose(level='info'):
2000+
def set_loglevel(level='info'):
20012001
"""
20022002
Shortcut to set the debugging level of the logging module.
20032003
@@ -2020,24 +2020,7 @@ def verbose(level='info'):
20202020
_log.setLevel(logging.DEBUG) # or logging.WARNING, logging.INFO
20212021
20222022
"""
2023-
matplotlib.verbose(level=level)
2024-
2025-
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')
2023+
matplotlib.set_loglevel(level=level)
20412024

20422025

20432026
def _setup_pyplot_info_docstrings():

0 commit comments

Comments
 (0)
0