From 50887b49cddaed88f1a148b175cc7031b45e43fa Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Fri, 27 Nov 2015 12:17:58 +0100 Subject: [PATCH] Simplify logging. --- accountant/__init__.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/accountant/__init__.py b/accountant/__init__.py index 757bd73..7939c3d 100644 --- a/accountant/__init__.py +++ b/accountant/__init__.py @@ -16,8 +16,6 @@ """ from contextlib import contextmanager -import logging - from flask import Flask, redirect, url_for from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.bower import Bower @@ -25,19 +23,12 @@ from flask.ext.assets import Environment, Bundle from . import config -logging.basicConfig() - -if config.debug: - logging.getLogger().setLevel(logging.DEBUG) - logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) -else: - logging.getLogger().setLevel(logging.INFO) # The app app = Flask(__name__, static_folder=None) app.config['SQLALCHEMY_DATABASE_URI'] = config.db_uri -app.config['SQLALCHEMY_RECORD_QUERIES'] = config.debug +app.config['SQLALCHEMY_ECHO'] = app.debug app.config['WTF_CSRF_ENABLED'] = False app.config['SECRET_KEY'] = 'my_secret_key'