mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
Merge pull request #2 from alphagov/logging-integration
Added logging from notifications-utils.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user