Skip to content

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

Merged
sentrivana merged 3 commits into
masterfrom
ivana/debug-logger-parent-handlers
Mar 13, 2025
Merged

fix(debug): Take into account parent handlers for debug logger#4133
sentrivana merged 3 commits into
masterfrom
ivana/debug-logger-parent-handlers

Conversation

@sentrivana

@sentrivana sentrivana commented Mar 13, 2025

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Mar 13, 2025

Copy link
Copy Markdown

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%> (ø)

@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
@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