Skip to content

Commit 3793084

Browse files
authored
fix(debug): Take into account parent handlers for debug logger (#4133)
We only check `logger.handlers` for existing handlers. This ignores any potential parent handlers. By using `hasHandlers()` ([docs](https://docs.python.org/3/library/logging.html#logging.Logger.hasHandlers)) instead we take those into account as well. Closes #3944
1 parent 4f51ff3 commit 3793084

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def filter(self, record):
1919

2020
def init_debug_support():
2121
# type: () -> None
22-
if not logger.handlers:
22+
if not logger.hasHandlers():
2323
configure_logger()
2424

2525

0 commit comments

Comments
 (0)