From b76c798dd57aaae9370120de639023e157ffb671 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 28 Jul 2020 00:49:13 -0600 Subject: [PATCH 1/2] MNT: Fix example code to enable logging. `set_level` doesn't exist, and nothing appears without a handler. --- doc/api/prev_api_changes/api_changes_3.1.0.rst | 3 ++- 1 file changed, 2 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..b29bf22282a9 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,8 @@ The following miscellaneous API elements have been removed import logging logger = logging.getLogger('matplotlib') - logger.set_level(logging.INFO) + logger.addHandler(logging.StreamHandler()) + logger.setLevel(logging.INFO) - ``__version__numpy__`` - ``collections.CIRCLE_AREA_FACTOR`` From 5acdc22f56ab3e85d281846a808559452904f52e Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 28 Jul 2020 11:42:55 -0600 Subject: [PATCH 2/2] Add comment about addHandler Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- doc/api/prev_api_changes/api_changes_3.1.0.rst | 5 ++++- 1 file changed, 4 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 b29bf22282a9..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,8 +531,11 @@ The following miscellaneous API elements have been removed import logging logger = logging.getLogger('matplotlib') - logger.addHandler(logging.StreamHandler()) 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`` pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy