Skip to content

Commit

Permalink
FIX agherant logging
Browse files Browse the repository at this point in the history
closes #88
  • Loading branch information
boyska committed Feb 13, 2015
1 parent b1ac5fa commit bed8a30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions webant/agherant.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def autoreplace(description_url):
descriptions = map(autoreplace, descriptions)
clients = []
for url in descriptions:
log.debug("Fetching description %s")
try:
clients.append(Client(url))
except:
Expand Down
17 changes: 10 additions & 7 deletions webant/agherant_standalone.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
import logging

from flask import Flask, request
from flask_bootstrap import Bootstrap
from flask.ext.babel import Babel

import agherant
from webant import initLoggers
from webserver_utils import gevent_run
import config_utils


def create_app():
initLoggers()
conf = {'DEBUG': True,
'AGHERANT_DESCRIPTIONS': []}
conf.update(config_utils.from_envvar_file('WEBANT_SETTINGS'))
conf.update(config_utils.from_envvars(prefix='WEBANT_'))
initLoggers(logging.DEBUG if conf.get('DEBUG', False) else logging.WARNING)
app = Flask(__name__)
app.config.update({
'AGHERANT_DESCRIPTIONS': [],
'DEBUG': True,
'SECRET_KEY': 'really insecure, please change me!'
})
app.config.update(config_utils.from_envvar_file('WEBANT_SETTINGS'))
app.config.update(config_utils.from_envvars(prefix='WEBANT_'))
app.config.update(conf)
Bootstrap(app)
babel = Babel(app)
app.register_blueprint(agherant.agherant, url_prefix='/agherant')
Expand Down

0 comments on commit bed8a30

Please sign in to comment.