Add logging to log entries
This commit is contained in:
parent
f29d3a9180
commit
3b3b55cf5d
3 changed files with 16 additions and 1 deletions
|
@ -20,9 +20,22 @@ from endpoints.webhooks import webhooks
|
|||
from endpoints.realtime import realtime
|
||||
from endpoints.callbacks import callback
|
||||
|
||||
from logentries import LogentriesHandler
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
profile = logging.getLogger('application.profiler')
|
||||
|
||||
werkzeug = logging.getLogger('werkzeug')
|
||||
werkzeug.setLevel(logging.DEBUG)
|
||||
|
||||
profile = logging.getLogger('profile')
|
||||
profile.setLevel(logging.DEBUG)
|
||||
|
||||
logentries_key = application.config.get('LOGENTRIES_KEY', None)
|
||||
if logentries_key:
|
||||
logger.debug('Initializing logentries with key: %s' % logentries_key)
|
||||
werkzeug.addHandler(LogentriesHandler(logentries_key))
|
||||
profile.addHandler(LogentriesHandler(logentries_key))
|
||||
|
||||
application.register_blueprint(web)
|
||||
application.register_blueprint(callback, url_prefix='/oauth2')
|
||||
|
|
|
@ -35,3 +35,4 @@ raven
|
|||
python-ldap
|
||||
unidecode
|
||||
pycrypto
|
||||
logentries==0.2
|
|
@ -30,6 +30,7 @@ html5lib==0.999
|
|||
itsdangerous==0.24
|
||||
jsonschema==2.3.0
|
||||
lockfile==0.9.1
|
||||
logentries==0.2
|
||||
loremipsum==1.0.2
|
||||
marisa-trie==0.6
|
||||
mixpanel-py==3.1.2
|
||||
|
|
Reference in a new issue