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:
parent
db0b28eadb
commit
b54ebacdfb
1 changed files with 3 additions and 4 deletions
7
app.py
7
app.py
|
@ -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
|
||||
|
||||
|
||||
|
|
Reference in a new issue