From 744ee504ef7cf6bb1d3c53a8467a14be36117231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20J=C3=A9go?= Date: Fri, 19 Nov 2021 09:25:27 +0100 Subject: [PATCH] Log Send reponse before removing MDC information link to Landry test on georchestra/cadastrapp#554 --- .../cadastrapp/providers/CadastrappInterceptor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cadastrapp/src/main/java/org/georchestra/cadastrapp/providers/CadastrappInterceptor.java b/cadastrapp/src/main/java/org/georchestra/cadastrapp/providers/CadastrappInterceptor.java index 950aecea..0f7e2abd 100644 --- a/cadastrapp/src/main/java/org/georchestra/cadastrapp/providers/CadastrappInterceptor.java +++ b/cadastrapp/src/main/java/org/georchestra/cadastrapp/providers/CadastrappInterceptor.java @@ -69,14 +69,14 @@ public void postHandle( HttpServletRequest request, HttpServletResponse response if(logger.isDebugEnabled()){ long executeTime = System.currentTimeMillis() - (Long)request.getAttribute("startTime"); logger.debug("Request handle in " + executeTime + "ms"); - } - + } + + logger.info("Send response"); + MDC.remove(CadastrappConstants.HTTP_HEADER_USERNAME); MDC.remove(CadastrappConstants.HTTP_HEADER_ROLES); MDC.remove(CadastrappConstants.HTTP_HEADER_ORGANISME); MDC.remove("uri"); - - logger.info("Send response"); } }