Skip to content

Commit

Permalink
Add Sentry logging
Browse files Browse the repository at this point in the history
  • Loading branch information
beaugunderson committed Jan 28, 2014
1 parent ad167c4 commit 9dcab0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@

from flask import Flask, request, render_template, url_for
from flask.ext.jsonpify import jsonify
from raven.contrib.flask import Sentry
from twilio import TwilioRestException

from models import aggregate_stats # , log_call
from utils import get_database, play_or_say
from political_data import PoliticalData

app = Flask(__name__)

app.config.from_object('config.ConfigProduction')

app = Sentry(app)

db = get_database(app)

call_methods = ['GET', 'POST']
Expand Down
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Config(object):
class ConfigProduction(Config):
DEBUG = strtobool(os.environ.get('DEBUG', 'false'))

SENTRY_DSN = os.environ.get('SENTRY_DSN')

APPLICATION_ROOT = os.environ.get('APPLICATION_ROOT')
TW_CLIENT = twilio.rest.TwilioRestClient(
os.environ.get('TWILIO_ACCOUNT_SID'),
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ MySQL-python==1.2.5
PyYAML==3.10
SQLAlchemy==0.8.1
Werkzeug==0.9.4
blinker==1.3
gunicorn==17.5
httplib2==0.8
itsdangerous==0.23
nose==1.3.0
pystache==0.5.3
python-dateutil==2.1
pytz==2013b
raven==4.0.3
requests==1.2.3
six==1.3.0
twilio==3.5.1
Expand Down

0 comments on commit 9dcab0f

Please sign in to comment.