Merge pull request #47 from alphagov/integrate-logging

Integrated logging from the utils repo
This commit is contained in:
Rebecca Law
2016-01-07 15:58:05 +00:00
4 changed files with 10 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ from app.notify_client.api_client import AdminAPIClient
from app.its_dangerous_session import ItsdangerousSessionInterface from app.its_dangerous_session import ItsdangerousSessionInterface
import app.proxy_fix import app.proxy_fix
from config import configs from config import configs
from utils import logging
db = SQLAlchemy() db = SQLAlchemy()
@@ -31,6 +32,7 @@ def create_app(config_name):
db.init_app(application) db.init_app(application)
init_app(application) init_app(application)
init_csrf(application) init_csrf(application)
logging.init_app(application)
login_manager.init_app(application) login_manager.init_app(application)
login_manager.login_view = 'main.sign_in' login_manager.login_view = 'main.sign_in'

View File

@@ -7,6 +7,10 @@ class Config(object):
cache = False cache = False
manifest = True manifest = True
NOTIFY_LOG_LEVEL = 'DEBUG'
NOTIFY_APP_NAME = 'api'
NOTIFY_LOG_PATH = '/var/log/notify/application.log'
SQLALCHEMY_COMMIT_ON_TEARDOWN = False SQLALCHEMY_COMMIT_ON_TEARDOWN = False
SQLALCHEMY_RECORD_QUERIES = True SQLALCHEMY_RECORD_QUERIES = True
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/notifications_admin' SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/notifications_admin'
@@ -32,7 +36,7 @@ class Development(Config):
class Test(Config): class Test(Config):
DEBUG = False DEBUG = True
SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/test_notifications_admin' SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/test_notifications_admin'
WTF_CSRF_ENABLED = False WTF_CSRF_ENABLED = False

View File

@@ -10,3 +10,5 @@ Flask-Login==0.2.11
Flask-Bcrypt==0.6.2 Flask-Bcrypt==0.6.2
git+https://github.com/alphagov/notify-api-client.git@0.1.4#egg=notify-api-client==0.1.4 git+https://github.com/alphagov/notify-api-client.git@0.1.4#egg=notify-api-client==0.1.4
git+https://github.com/alphagov/notifications-utils.git@0.0.3#egg=notifications-utils==0.0.3

View File

@@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
python app.py runserver python3 app.py runserver