Merge pull request #2 from alphagov/logging-integration

Added logging from notifications-utils.
This commit is contained in:
minglis
2016-01-07 13:32:03 +00:00
3 changed files with 9 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ from flask._compat import string_types
from flask import Flask, _request_ctx_stack
from werkzeug.local import LocalProxy
from config import configs
from utils import logging
api_user = LocalProxy(lambda: _request_ctx_stack.top.api_user)
@@ -16,6 +18,8 @@ def create_app(config_name):
init_app(application)
logging.init_app(application)
from .main import main as main_blueprint
application.register_blueprint(main_blueprint)

View File

@@ -1,6 +1,9 @@
class Config(object):
DEBUG = False
NOTIFY_LOG_LEVEL = 'DEBUG'
NOTIFY_APP_NAME = 'api'
NOTIFY_LOG_PATH = '/var/log/notify/application.log'
class Development(Config):

View File

@@ -3,3 +3,5 @@ Flask-Script==2.0.5
PyJWT==1.4.0
git+https://github.com/alphagov/notifications-python-client.git@0.1.5#egg=notifications-python-client==0.1.5
git+https://github.com/alphagov/notifications-utils.git@0.0.3#egg=notifications-utils==0.0.3