8000 fix(logging): Send raw logging parameters · getsentry/sentry-python@f327c77 · GitHub
[go: up one dir, main page]

Skip to content

Commit f327c77

Browse files
fix(logging): Send raw logging parameters
This reverts commit 4c9731b. That commit caused a regression when `record.args` contains a dictionary. Because we iterate over `record.args`, that change caused us to only send the dictionary's keys, not the values. A more robust fix for #3660 will be to send the formatted message in the [`formatted` field](https://develop.sentry.dev/sdk/data-model/event-payloads/message/) (which we have not been doing yet). I will open a follow-up PR to do this. Fixes #4267
1 parent a3d4b89 commit f327c77

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sentry_sdk/integrations/logging.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,7 @@ def _emit(self, record):
265265
else:
266266
event["logentry"] = {
267267
"message": to_string(record.msg),
268-
"params": (
269-
tuple(str(arg) if arg is None else arg for arg in record.args)
270-
if record.args
271-
else ()
272-
),
268+
"params": record.args,
273269
}
274270

275271
event["extra"] = self._extra_from_record(record)

0 commit comments

Comments
 (0)
0