Created
April 15, 2013 17:28
-
-
Save loopj/5389777 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import logging | |
| import bugsnag | |
| class BugsnagHandler(logging.Handler): | |
| def emit(self, record): | |
| if record.levelno == logging.ERROR or record.levelno == logging.WARNING: | |
| bugsnag.notify(Exception(record.message)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment