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')
|
||||
|
|
Reference in a new issue