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

fix(debug): Take into account parent handlers for debug logger #4133

Merged
merged 3 commits into from
Mar 13, 2025

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Mar 13, 2025

We only check logger.handlers for existing handlers. This ignores any potential parent handlers. By using hasHandlers() (docs) instead we take those into account as well.

Closes #3944

Verified

This commit was signed with the committer’s verified signature.
sentrivana Ivana Kellyer

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link

codecov bot commented Mar 13, 2025

Codecov Report

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

Project coverage is 79.56%. Comparing base (4f51ff3) to head (d5c72fa).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/debug.py 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4133   +/-   ##
=======================================
  Coverage   79.56%   79.56%           
=======================================
  Files         140      140           
  Lines       15636    15636           
  Branches     2652     2652           
=======================================
  Hits        12441    12441           
  Misses       2362     2362           
  Partials      833      833           
Files with missing lines Coverage Δ
sentry_sdk/debug.py 91.30% <0.00%> (ø)

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@sentrivana sentrivana marked this pull request as ready for review March 13, 2025 15:27
@sentrivana sentrivana requested a review from antonpirker March 13, 2025 15:27
@sentrivana sentrivana enabled auto-merge (squash) March 13, 2025 15:34
@sentrivana sentrivana merged commit 3793084 into master Mar 13, 2025
138 of 139 checks passed
@sentrivana sentrivana deleted the ivana/debug-logger-parent-handlers branch March 13, 2025 15:35
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.

Debug logs duplication due to incorrect configuration
2 participants