Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
set_loglevel documenation and escape hatch#23681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
and that set_loglevel tries to be helpful and installs a stream handler.
Parameters | ||
---------- | ||
level : {"notset", "debug", "info", "warning", "error", "critical"} | ||
The log level of the handler. | ||
ensure_handler : bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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.
l-johnstonAug 20, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
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
logging
and its singleton logger is called 'matplotlib' and in their library code get the 'matplotlib' logger and add the desired handler.
Consensus is that this is better as just documentation updates. |
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
pytest
passes).flake8-docstrings
and 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).