refactor: replace logging with structlog in helpers/yes_no.py (issue #9529)#9547
Draft
hiijoshi wants to merge 1 commit intoborgbackup:masterfrom
Draft
refactor: replace logging with structlog in helpers/yes_no.py (issue #9529)#9547hiijoshi wants to merge 1 commit intoborgbackup:masterfrom
hiijoshi wants to merge 1 commit intoborgbackup:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9547 +/- ##
==========================================
- Coverage 83.40% 83.35% -0.05%
==========================================
Files 87 87
Lines 15469 15468 -1
Branches 2321 2321
==========================================
- Hits 12902 12894 -8
- Misses 1818 1821 +3
- Partials 749 753 +4 ☔ View full report in Codecov by Sentry. |
…#9529) - helpers/yes_no.py: replace logging.getLogger with structlog.get_logger - helpers/misc.py: remove unused logging import, use plain int for level
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.
Closes #9529
Refactored log output in
helpers/to usestructloginstead of Python's built-inloggingmodule.Changes:
helpers/yes_no.py: replacedlogging.getLoggerwithstructlog.get_loggerhelpers/misc.py: removed unusedloggingimport, replacedlogging.INFOwith plain integer20Skipped for now:
helpers/progress.py: usessetLevel()which structlog doesn't support directly — needs discussionhelpers/__init__.py: useslogging.getLogger("borg.output.show-rc")— needs discussionAll existing tests pass.