mirror of
https://github.com/apache/superset.git
synced 2026-06-07 16:49:17 +00:00
Redirect application log to stderr, which is picked up by gunicorn. (#335)
This commit is contained in:
committed by
Maxime Beauchemin
parent
17e711fda2
commit
efc6bf4eb8
@@ -26,6 +26,11 @@ logging.getLogger().setLevel(logging.DEBUG)
|
||||
|
||||
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'))
|
||||
|
||||
Reference in New Issue
Block a user