Simplify logging.
This commit is contained in:
parent
a6da594aeb
commit
50887b49cd
@ -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'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user