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

Skip to content

Commit a280114

Browse files
dopplershiftmeeseeksmachine
authored andcommitted
Backport PR #18094: Fix example code for enabling logging in API change notice
1 parent 6bd7218 commit a280114

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)