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

Skip to content

Commit 9a7eae1

Browse files
authored
Merge pull request #18105 from meeseeksmachine/auto-backport-of-pr-18094-on-v3.3.0-doc
Backport PR #18094 on branch v3.3.0-doc (Fix example code for enabling logging in API change notice)
2 parents 6bd7218 + a280114 commit 9a7eae1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

doc/api/prev_api_changes/api_changes_3.1.0.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,11 @@ The following miscellaneous API elements have been removed
531531

532532
import logging
533533
logger = logging.getLogger('matplotlib')
534-
logger.set_level(logging.INFO)
534+
logger.setLevel(logging.INFO)
535+
# configure log handling: Either include it into your ``logging`` hierarchy,
536+
# e.g. by configuring a root looger using ``logging.basicConfig()``,
537+
# or add a standalone handler to the matplotlib logger:
538+
logger.addHandler(logging.StreamHandler())
535539

536540
- ``__version__numpy__``
537541
- ``collections.CIRCLE_AREA_FACTOR``

0 commit comments

Comments
 (0)