diff --git a/caravel/__init__.py b/caravel/__init__.py index 57888c9bdb26d..74dcbd5584106 100644 --- a/caravel/__init__.py +++ b/caravel/__init__.py @@ -26,6 +26,11 @@ app = Flask(__name__) app.config.from_object(CONFIG_MODULE) +if not app.debug: + # In production mode, add log handler to sys.stderr. + app.logger.addHandler(logging.StreamHandler()) + app.logger.setLevel(logging.INFO) + db = SQLA(app) cache = Cache(app, config=app.config.get('CACHE_CONFIG'))