From a2801149d394c7b78b53f448d7adef47237ac04c Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 28 Jul 2020 16:45:01 -0600 Subject: [PATCH] Backport PR #18094: Fix example code for enabling logging in API change notice --- doc/api/prev_api_changes/api_changes_3.1.0.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/api/prev_api_changes/api_changes_3.1.0.rst b/doc/api/prev_api_changes/api_changes_3.1.0.rst index 90d4fc3548bd..2c0f629729db 100644 --- a/doc/api/prev_api_changes/api_changes_3.1.0.rst +++ b/doc/api/prev_api_changes/api_changes_3.1.0.rst @@ -531,7 +531,11 @@ The following miscellaneous API elements have been removed import logging logger = logging.getLogger('matplotlib') - logger.set_level(logging.INFO) + logger.setLevel(logging.INFO) + # configure log handling: Either include it into your ``logging`` hierarchy, + # e.g. by configuring a root looger using ``logging.basicConfig()``, + # or add a standalone handler to the matplotlib logger: + logger.addHandler(logging.StreamHandler()) - ``__version__numpy__`` - ``collections.CIRCLE_AREA_FACTOR``