diff --git a/ckan/cli/__init__.py b/ckan/cli/__init__.py index 9218458d093..1b7029d3bee 100644 --- a/ckan/cli/__init__.py +++ b/ckan/cli/__init__.py @@ -13,7 +13,7 @@ from ckan.config.middleware import make_app -log = logging.getLogger(__name__) +log = logging.getLogger('werkzeug') logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s') diff --git a/ckan/cli/db.py b/ckan/cli/db.py index 70793555a70..e8ddbe00225 100644 --- a/ckan/cli/db.py +++ b/ckan/cli/db.py @@ -65,7 +65,7 @@ def updatedb(version=None): @click.help_option(u'-h', u'--help') def version(): u'''Return current version''' - log.info("Returning current DB version") + log.info("Returning current DB") try: from ckan.model import Session ver = Session.execute(u'select version from ' diff --git a/ckan/config/middleware/flask_app.py b/ckan/config/middleware/flask_app.py index 3c56278b78a..e10ba332364 100644 --- a/ckan/config/middleware/flask_app.py +++ b/ckan/config/middleware/flask_app.py @@ -111,6 +111,7 @@ def make_flask_stack(conf, **app_conf): app = DebuggedApplication(app, True) app = app.app + # Use Beaker as the Flask session interface class BeakerSessionInterface(SessionInterface): def open_session(self, app, request): @@ -269,6 +270,8 @@ def hello_world_post(): # Add a reference to the actual Flask app so it's easier to access app._wsgi_app = flask_app + app.logger.propagate = True + # app.logger.propagate = True return app