Simplify logging.

This commit is contained in:
Alexis Lahouze 2015-11-27 12:17:58 +01:00
parent a6da594aeb
commit 50887b49cd

View File

@ -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'