Skip to content

Instantly share code, notes, and snippets.

@loopj
Created April 15, 2013 17:28
Show Gist options
  • Select an option

  • Save loopj/5389777 to your computer and use it in GitHub Desktop.

Select an option

Save loopj/5389777 to your computer and use it in GitHub Desktop.
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