diff options
author | François Schmidts <francois.schmidts@gmail.com> | 2015-04-16 17:28:37 +0200 |
---|---|---|
committer | François Schmidts <francois.schmidts@gmail.com> | 2015-04-16 17:28:37 +0200 |
commit | 6119f21815e0fe00db04caff4272344fa10da0de (patch) | |
tree | 1f5aad5dd88763f791c7d27a16ed44d1684f229d /bootstrap.py | |
parent | misc bugfix (dict should be set at load time) and var renaming (diff) | |
download | newspipe-6119f21815e0fe00db04caff4272344fa10da0de.tar.gz newspipe-6119f21815e0fe00db04caff4272344fa10da0de.tar.bz2 newspipe-6119f21815e0fe00db04caff4272344fa10da0de.zip |
facto on config and more option in log levels
Diffstat (limited to 'bootstrap.py')
-rw-r--r-- | bootstrap.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bootstrap.py b/bootstrap.py index 9c2ce049..7a5a9b6e 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -22,13 +22,12 @@ from flask.ext.sqlalchemy import SQLAlchemy # Create Flask application application = Flask('pyaggr3g470r') -application.debug = conf.WEBSERVER_DEBUG +application.debug = conf.LOG_LEVEL <= logging.DEBUG scheme, domain, _, _, _ = urlsplit(conf.PLATFORM_URL) application.config['SERVER_NAME'] = domain application.config['PREFERRED_URL_SCHEME'] = scheme -set_logging(conf.LOG_PATH, - log_level=logging.DEBUG if conf.WEBSERVER_DEBUG else logging.INFO) +set_logging(conf.LOG_PATH, log_level=conf.LOG_LEVEL) # Create dummy secrey key so we can use sessions application.config['SECRET_KEY'] = getattr(conf, 'WEBSERVER_SECRET', None) |