set_loglevel documenation and escape hatch #23681
Closed
tacaswell wants to merge 2 commits intomatplotlib:mainfrom
Closed
set_loglevel documenation and escape hatch #23681tacaswell wants to merge 2 commits intomatplotlib:mainfrom
tacaswell wants to merge 2 commits intomatplotlib:mainfrom
Conversation
and that set_loglevel tries to be helpful and installs a stream handler.
jklymak
reviewed
Aug 20, 2022
| level : {"notset", "debug", "info", "warning", "error", "critical"} | ||
| The log level of the handler. | ||
|
|
||
| ensure_handler : bool |
Member
There was a problem hiding this comment.
I guess I am not sure why we would add this. A naive enduser unfamiliar with logging won't know what this means, and a library author familiar with logging should know not to call this, particularly given the change to the docstring above. If we do add this, the docstring below probably needs to be clarified.
Contributor
There was a problem hiding this comment.
I agree; a documentation update should be sufficient:
- Add a new section for discussion of logging within Matplotlib - the two use cases as a library and as an application
- End users can call set_level()
- For library developers, state that Matplotlib is using the standard library
loggingand its singleton logger is called 'matplotlib' and in their library code get the 'matplotlib' logger and add the desired handler.
Member
Author
|
Consensus is that this is better as just documentation updates. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
closes #23646
If we want this new flag I'll add a test. I am of two minds on it, we might only want the doc updates.
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).