This repository was archived by the owner on Nov 28, 2022. It is now read-only.
Allow Disabling stderr Output#83
Merged
metachris merged 2 commits intometachris:masterfrom Mar 2, 2018
brianlenz:disable-stderr-logger
Merged
Allow Disabling stderr Output#83metachris merged 2 commits intometachris:masterfrom brianlenz:disable-stderr-logger
metachris merged 2 commits intometachris:masterfrom
brianlenz:disable-stderr-logger
Conversation
* Added the ability to disable stderr output when logging to a file so that you aren't forced to have double-logging. * Fixed a minor logic bug with `StreamHandler` detection. `FileHandler` extends from `StreamHandler` so checking if the `handler` is an instanceof `StreamHandler` alone isn't sufficient, as it could actually be a `FileHandler`. Discovered this when running unit tests for the new functionality. Reordered the logic in order to ensure the detected `StreamHandler` is always the internally-created `stderr` handler so that it can be disabled properly.
Owner
|
Great, thank you! May I ask that you also add info about the param here: https://github.com/metachris/logzero/blob/master/docs/index.rst <3 |
Author
|
Definitely! |
* Added documentation and examples for disabling the default stderr logger.
Owner
|
v1.4.0 is on its way |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Added the ability to disable stderr output when logging to a file so that you aren't forced to have double-logging.
Fixed a minor logic bug with
StreamHandlerdetection.FileHandlerextends fromStreamHandlerso checking if thehandleris an instanceofStreamHandleralone isn't sufficient, as it could actually be aFileHandler. Discovered this when running unit tests for the new functionality. Reordered the logic in order to ensure the detectedStreamHandleris always the internally-createdstderrhandler so that it can be disabled properly.