Reduce SO log noise further 23/141523/1
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sat, 12 Jul 2025 07:31:22 +0000 (09:31 +0200)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Sat, 12 Jul 2025 07:31:22 +0000 (09:31 +0200)
- remove Invoke and InvokeReturn that are logged for each request

Issue-ID: SO-4192
Change-Id: Ia75f8ea8a70188005b171eff4cac91e6a6d2530a
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
common/src/main/java/org/onap/so/logging/jaxrs/filter/SOMetricLogClientFilter.java
common/src/main/java/org/onap/so/logging/jaxrs/filter/SOSpringClientFilter.java

index 3b6b521..d7543e3 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,14 +28,11 @@ import org.onap.so.logger.MdcConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.MDC;
-import org.slf4j.Marker;
-import org.slf4j.MarkerFactory;
 
 
 public class SOMetricLogClientFilter extends MetricLogClientFilter {
 
     protected static Logger logger = LoggerFactory.getLogger(SOMetricLogClientFilter.class);
-    private static final Marker INVOKE_RETURN = MarkerFactory.getMarker("INVOKE-RETURN");
 
     @Override
     public void filter(ClientRequestContext requestContext, ClientResponseContext responseContext) {
@@ -45,7 +42,6 @@ public class SOMetricLogClientFilter extends MetricLogClientFilter {
             setResponseStatusCode(responseContext.getStatus());
             setResponseDescription(responseContext.getStatus());
             MDC.put(ONAPLogConstants.MDCs.RESPONSE_CODE, String.valueOf(responseContext.getStatus()));
-            logger.info(INVOKE_RETURN, "InvokeReturn");
             clearClientMDCs();
             setOpenStackResponseCode();
         } catch (Exception e) {
index cf826d6..6ff059b 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -38,7 +38,6 @@ import org.springframework.stereotype.Component;
 public class SOSpringClientFilter extends SpringClientFilter implements ClientHttpRequestInterceptor {
 
     private final Logger logger = LoggerFactory.getLogger(this.getClass());
-    private static final Marker INVOKE_RETURN = MarkerFactory.getMarker("INVOKE-RETURN");
 
     @Override
     protected void post(HttpRequest request, ClientHttpResponse response) {
@@ -54,7 +53,6 @@ public class SOSpringClientFilter extends SpringClientFilter implements ClientHt
         }
 
 
-        logger.info(INVOKE_RETURN, "InvokeReturn");
         clearClientMDCs();
         setOpenStackResponseCode();
     }