Improve Python bskLogging API with convenience methods and level aliases#1409
Open
ReeceHumphreys wants to merge 6 commits into
Open
Improve Python bskLogging API with convenience methods and level aliases#1409ReeceHumphreys wants to merge 6 commits into
ReeceHumphreys wants to merge 6 commits into
Conversation
1547d89 to
c1e3272
Compare
99b9ca5 to
776c50e
Compare
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.
Description
The bskLogger Python API doesn't match the conventions of Python's standard logging module. This is just a consequence of the SWIG code generation used to expose the C++ class. This PR adds purely additive aliases and convenience methods so users can interact with bskLogger in a more natural and Pythonic way:
debug(),info(),warning(),error()convenience methods onBSKLoggerwhich mirror thelogging.LoggerAPI.setLevel()as an alias forsetLogLevel()LogLevelIntEnum for typed level referencesAll existing APIs remain unchanged so this is fully backward compatible.
Also some minor formatting fixes were applied to the files that were updated. Generally I think when updating these older files its okay to allow the formatter to make some cleanup as long as we don't go overboard and muddle the diff with 1000s of LOC changes.
Verification
Tests passing
Documentation
Updated the bskLogging related documentation.
Future work