Improve debug logging level
This commit is contained in:
parent
7049e9e905
commit
f2d95da063
2 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ def query_comments():
|
||||||
if comment.author_email:
|
if comment.author_email:
|
||||||
d['avatar'] = md5(comment.author_email.strip().lower())
|
d['avatar'] = md5(comment.author_email.strip().lower())
|
||||||
d['date'] = comment.published.strftime("%Y-%m-%d %H:%M:%S")
|
d['date'] = comment.published.strftime("%Y-%m-%d %H:%M:%S")
|
||||||
logger.info(d)
|
logger.debug(d)
|
||||||
comments.append(d)
|
comments.append(d)
|
||||||
r = jsonify({'data': comments})
|
r = jsonify({'data': comments})
|
||||||
r.status_code = 200
|
r.status_code = 200
|
||||||
|
@ -155,4 +155,3 @@ def reject_comment():
|
||||||
abort(500)
|
abort(500)
|
||||||
|
|
||||||
return "REJECTED"
|
return "REJECTED"
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ cors = CORS(app, resources={r"/comments/*": {"origins": "*"}})
|
||||||
# tune logging level
|
# tune logging level
|
||||||
if not config.DEBUG:
|
if not config.DEBUG:
|
||||||
logging.getLogger('flask_cors').level = logging.WARNING
|
logging.getLogger('flask_cors').level = logging.WARNING
|
||||||
|
logging.getLogger('app.cors').level = logging.WARNING
|
||||||
logging.getLogger('werkzeug').level = logging.WARNING
|
logging.getLogger('werkzeug').level = logging.WARNING
|
||||||
|
|
||||||
app.run(host=config.HTTP_ADDRESS,
|
app.run(host=config.HTTP_ADDRESS,
|
||||||
|
|
Loading…
Add table
Reference in a new issue