Remove request-start and request-end info logs

They aren't useful and take up a lot of logs space
This commit is contained in:
Joseph Schorr 2018-01-04 12:58:30 -05:00
parent db0b28eadb
commit b54ebacdfb
1 changed files with 3 additions and 4 deletions

7
app.py
View File

@ -123,8 +123,8 @@ class RequestWithId(Request):
@app.before_request
def _request_start():
logger.debug('Starting request: %s', request.path)
logger.info("request-start", extra={"request_id": request.request_id})
logger.debug('Starting request: %s (%s)', request.request_id, request.path,
extra={"request_id": request.request_id})
DEFAULT_FILTER = lambda x: '[FILTERED]'
@ -161,8 +161,7 @@ def _request_end(resp):
if request.user_agent is not None:
extra["user-agent"] = request.user_agent.string
logger.info("request-end", extra=extra)
logger.debug('Ending request: %s', request.path)
logger.debug('Ending request: %s (%s)', request.request_id, request.path, extra=extra)
return resp