mirror of https://github.com/apache/superset.git
Redirect application log to stderr, which is picked up by gunicorn. (#335)
This commit is contained in:
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'))
|
||||
|
|
Loading…
Reference in New Issue