Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Conversation

@gthb
Copy link
Contributor

@gthb gthb commented Nov 25, 2013

For consistency with superclass and with logging.Handler

For consistency with superclass and with logging.Handler
@xordoquy
Copy link
Contributor

I'm a bit curious about the use case that lead to this change.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling bc5fa08 on gthb:fix-handler-init-missing-level-param into 4efb80e on getsentry:master.

@gthb
Copy link
Contributor Author

gthb commented Nov 25, 2013

I was troubleshooting the fact that my use of logger.error(..., extra={'request': request}) was not working (no request information made it through), and found that I was initializing logging with this:

from raven.handlers.logging import SentryHandler
handler = SentryHandler(raven_client, level=logging.ERROR)

whereas I needed the Django-specific handler to get the extra={'request': request} handled. So I just changed the import to from raven.contrib.django.handlers import SentryHandler ... but then the call fails because the level parameter is invalid. That inconsistency seems unnecessary, hence this change.

@xordoquy
Copy link
Contributor

Ok, thanks :)

xordoquy added a commit that referenced this pull request Nov 25, 2013
Allow level param in Django SentryHandler.__init__
@xordoquy xordoquy merged commit 684d20d into getsentry:master Nov 25, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants