mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
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 = Flask(__name__)
|
||||||
app.config.from_object(CONFIG_MODULE)
|
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)
|
db = SQLA(app)
|
||||||
|
|
||||||
cache = Cache(app, config=app.config.get('CACHE_CONFIG'))
|
cache = Cache(app, config=app.config.get('CACHE_CONFIG'))
|
||||||
|
Loading…
Reference in New Issue
Block a user