Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a proxy logger that suppresses debug & info messages by default #583

Merged
merged 7 commits into from
Dec 31, 2024

Conversation

mdekstrand
Copy link
Member

This adds a custom get_logger function that returns a lazy logger that, when structlog has not been configured, uses a default logger that filters out debug and info messages.

All LensKit code should use this function instead of structlog.stdlib.get_logger or structlog.get_logger to get logger objects.

@mdekstrand mdekstrand added the internals Internal infrastructure (parallelism, math, etc.) label Dec 31, 2024
@mdekstrand mdekstrand added this to the 2025.1 milestone Dec 31, 2024
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.71%. Comparing base (48eb645) to head (80fb41b).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
lenskit/lenskit/logging/_proxy.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #583   +/-   ##
=======================================
  Coverage   90.70%   90.71%           
=======================================
  Files         105      106    +1     
  Lines        6512     6526   +14     
=======================================
+ Hits         5907     5920   +13     
- Misses        605      606    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mdekstrand mdekstrand merged commit 0b55981 into lenskit:main Dec 31, 2024
39 checks passed
@mdekstrand mdekstrand deleted the feature/quiet-default-logger branch December 31, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Internal infrastructure (parallelism, math, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant