Set Flask logging level
This commit is contained in:
parent
5848b8df8e
commit
7049e9e905
1 changed files with 5 additions and 0 deletions
|
@ -63,6 +63,11 @@ logger.info("Start Stacosys application")
|
|||
# enable CORS
|
||||
cors = CORS(app, resources={r"/comments/*": {"origins": "*"}})
|
||||
|
||||
# tune logging level
|
||||
if not config.DEBUG:
|
||||
logging.getLogger('flask_cors').level = logging.WARNING
|
||||
logging.getLogger('werkzeug').level = logging.WARNING
|
||||
|
||||
app.run(host=config.HTTP_ADDRESS,
|
||||
port=config.HTTP_PORT,
|
||||
debug=config.DEBUG, use_reloader=False)
|
||||
|
|
Loading…
Add table
Reference in a new issue