File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,18 @@ def setup_once():
91
91
92
92
8000
def sentry_patched_callhandlers (self , record ):
93
93
# type: (Any, LogRecord) -> Any
94
+ # keeping a local reference because the
95
+ # global might be discarded on shutdown
96
+ ignored_loggers = _IGNORED_LOGGERS
97
+
94
98
try :
95
99
return old_callhandlers (self , record )
96
100
finally :
97
101
# This check is done twice, once also here before we even get
98
102
# the integration. Otherwise we have a high chance of getting
99
103
# into a recursion error when the integration is resolved
100
104
# (this also is slower).
101
- if record .name not in _IGNORED_LOGGERS :
105
+ if ignored_loggers is not None and record .name not in ignored_loggers :
102
106
integration = Hub .current .get_integration (LoggingIntegration )
103
107
if integration is not None :
104
108
integration ._handle_record (record )
You can’t perform that action at this time.
0 commit comments