do not log requests that begin with /_debug_toolbar

This commit is contained in:
Son NK 2019-07-06 17:50:21 +02:00 committed by Son NK
parent df3292df37
commit dcb1aa77a2
1 changed files with 4 additions and 2 deletions

View File

@ -146,8 +146,10 @@ def set_index_page(app):
@app.after_request @app.after_request
def after_request(res): def after_request(res):
# not logging /static call # not logging /static call
if not request.path.startswith("/static") and not request.path.startswith( if (
"/admin/static" not request.path.startswith("/static")
and not request.path.startswith("/admin/static")
and not request.path.startswith("/_debug_toolbar")
): ):
LOG.debug( LOG.debug(
"%s %s %s %s %s", "%s %s %s %s %s",