Skip to content

refactor: replace logging with structlog in helpers/yes_no.py (issue #9529)#9547

Draft
hiijoshi wants to merge 1 commit intoborgbackup:masterfrom
hiijoshi:master
Draft

refactor: replace logging with structlog in helpers/yes_no.py (issue #9529)#9547
hiijoshi wants to merge 1 commit intoborgbackup:masterfrom
hiijoshi:master

Conversation

@hiijoshi
Copy link
Copy Markdown
Contributor

@hiijoshi hiijoshi commented Mar 28, 2026

Closes #9529

Refactored log output in helpers/ to use structlog instead of Python's built-in logging module.

Changes:

  • helpers/yes_no.py: replaced logging.getLogger with structlog.get_logger
  • helpers/misc.py: removed unused logging import, replaced logging.INFO with plain integer 20

Skipped for now:

  • helpers/progress.py: uses setLevel() which structlog doesn't support directly — needs discussion
  • helpers/__init__.py: uses logging.getLogger("borg.output.show-rc") — needs discussion

All existing tests pass.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.35%. Comparing base (e9a7349) to head (bc51d2e).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

…#9529)

- helpers/yes_no.py: replace logging.getLogger with structlog.get_logger
- helpers/misc.py: remove unused logging import, use plain int for level
@ThomasWaldmann ThomasWaldmann marked this pull request as draft March 28, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

structlog?

1 participant