8000 fix(logs): send `severity_text`: `warn` instead of `warning` by lcian · Pull Request #4396 · getsentry/sentry-python · GitHub
[go: up one dir, main page]

Skip to content

fix(logs): send severity_text: warn instead of warning #4396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sentry_sdk/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def _capture_log(severity_text, severity_number, template, **kwargs):
trace = functools.partial(_capture_log, "trace", 1)
debug = functools.partial(_capture_log, "debug", 5)
info = functools.partial(_capture_log, "info", 9)
warning = functools.partial(_capture_log, "warning", 13)
warning = functools.partial(_capture_log, "warn", 13)
error = functools.partial(_capture_log, "error", 17)
fatal = functools.partial(_capture_log, "fatal", 21)
4 changes: 2 additions & 2 deletions tests/test_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def test_logs_basics(sentry_init, capture_envelopes):
assert logs[2].get("severity_text") == "info"
assert logs[2].get("severity_number") == 9

assert logs[3].get("severity_text") == "warning"
assert logs[3].get("severity_text") == "warn"
assert logs[3].get("severity_number") == 13

assert logs[4].get("severity_text") == "error"
Expand Down Expand Up @@ -155,7 +155,7 @@ def _before_log(record, hint):
assert logs[0]["severity_text"] == "trace"
assert logs[1]["severity_text"] == "debug"
assert logs[2]["severity_text"] == "info"
assert logs[3]["severity_text"] == "warning"
assert logs[3]["severity_text"] == "warn"
assert before_log_called[0]


Expand Down
Loading
0