Skip to content
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

Use logging levelno instead of levelname. Levelnames can be overridden #1449

Merged
merged 7 commits into from Jun 2, 2022

Conversation

rrauenza
Copy link
Contributor

See #1443

@rrauenza rrauenza marked this pull request as draft May 20, 2022 19:34
@rrauenza rrauenza marked this pull request as ready for review May 20, 2022 19:39
Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR @rrauenza !

Please add tests that change the level name of all levels and test for _logging_to_event_level returning the correct event level name here:
https://github.com/getsentry/sentry-python/blob/master/tests/integrations/logging/test_logging.py

If we have all those little changes, I think we are good to go!
Thanks!

sentry_sdk/integrations/logging.py Outdated Show resolved Hide resolved
sentry_sdk/integrations/logging.py Outdated Show resolved Hide resolved
sentry_sdk/integrations/logging.py Outdated Show resolved Hide resolved
@rrauenza
Copy link
Contributor Author

not set ... I'm not sure how to test that, so that line is commented out.

Ah, I see:

https://stackoverflow.com/a/70806760/2077386

I'm not sure sentry will see this case...

@antonpirker
Copy link
Member

Hey @rrauenza !

Thanks for the update!
I did some minor changes in your branch, but I think now everything looks good!

@antonpirker
Copy link
Member

@sl0thentr0py could you please have a look at this?

@antonpirker
Copy link
Member

Hey @rrauenza !
If the tests are all green, we are ready to merge this!

Thanks for this contribution, really great!

If you send me your shipping address to anton (dot) pirker [at] sentry {dot} io I can send you a couple of stickers as a small token of appreciation!

Copy link
Member

@antonpirker antonpirker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

sentry_sdk/integrations/logging.py Outdated Show resolved Hide resolved
sentry_sdk/integrations/logging.py Outdated Show resolved Hide resolved
sentry_sdk/integrations/logging.py Outdated Show resolved Hide resolved
@antonpirker antonpirker merged commit 3d38329 into getsentry:master Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants