use sentry for error monitoring
This commit is contained in:
parent
6d89600ec1
commit
0d16b1ef88
1 changed files with 5 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
from raven.contrib.flask import Sentry
|
||||
from woodwind import extensions
|
||||
from woodwind.api import api
|
||||
from woodwind.push import push
|
||||
|
@ -20,6 +21,8 @@ Message:
|
|||
%(message)s
|
||||
'''
|
||||
|
||||
sentry = Sentry()
|
||||
|
||||
|
||||
def create_app(config_path='../woodwind.cfg'):
|
||||
app = flask.Flask('woodwind')
|
||||
|
@ -38,6 +41,8 @@ def configure_logging(app):
|
|||
|
||||
app.logger.setLevel(logging.DEBUG)
|
||||
|
||||
sentry.init_app(app, dsn=app.config.get('SENTRY_DSN'), logging=True, level=logging.WARNING)
|
||||
|
||||
handler = logging.StreamHandler(sys.stdout)
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
handler.setFormatter(formatter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue