From b54ebacdfbb472e5a61e3729945d96a98d39dfb6 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 4 Jan 2018 12:58:30 -0500 Subject: [PATCH] Remove request-start and request-end info logs They aren't useful and take up a lot of logs space --- app.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 853bf2532..7ca66c53d 100644 --- a/app.py +++ b/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