Skip to content

Fix root logging level being set to INFO for all packages#298

Merged
PauBadiaM merged 1 commit intomainfrom
fix/root-logger-level
Apr 6, 2026
Merged

Fix root logging level being set to INFO for all packages#298
PauBadiaM merged 1 commit intomainfrom
fix/root-logger-level

Conversation

@PauBadiaM
Copy link
Copy Markdown
Collaborator

Summary

  • Replaced logging.basicConfig() in _log.py with a named decoupler logger so importing decoupler no longer sets the root logging level to INFO for all packages
  • Updated tests to capture logs from the named logger

Closes #296

Test plan

  • Verified root logger is unaffected after import decoupler
  • All 31 tests in tests/pp/test_net.py and tests/ds/test_toy.py pass
  • Pre-commit checks pass

🤖 Generated with Claude Code

Use a named logger ('decoupler') instead of logging.basicConfig() so
importing decoupler no longer affects the logging level of other packages.

Closes #296

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@PauBadiaM PauBadiaM merged commit db4d73d into main Apr 6, 2026
14 of 16 checks passed
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.31%. Comparing base (40092de) to head (24badca).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #298   +/-   ##
=======================================
  Coverage   94.30%   94.31%           
=======================================
  Files          78       78           
  Lines        4075     4079    +4     
=======================================
+ Hits         3843     3847    +4     
  Misses        232      232           
Files with missing lines Coverage Δ
src/decoupler/_log.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Decoupler sets logging level to INFO for all packages

2 participants