We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1521257 commit 9a5dabaCopy full SHA for 9a5daba
sentry_sdk/integrations/logging.py
@@ -157,7 +157,6 @@ def _emit(self, record):
157
if hub.client is None:
158
return
159
160
- hint = None # type: Optional[Dict[str, Any]]
161
client_options = hub.client.options
162
163
# exc_info might be None or (None, None, None)
@@ -169,7 +168,7 @@ def _emit(self, record):
169
168
)
170
elif record.exc_info and record.exc_info[0] is None:
171
event = {}
172
- hint = None
+ hint = {}
173
with capture_internal_exceptions():
174
event["threads"] = {
175
"values": [
@@ -184,6 +183,9 @@ def _emit(self, record):
184
183
}
185
else:
186
187
+
188
+ hint["log_record"] = record
189
190
event["level"] = _logging_to_event_level(record.levelname)
191
event["logger"] = record.name
0 commit comments