diff options
author | Sreeja Gattagouni <SG00744975@techmahindra.com> | 2024-06-10 13:14:36 +0530 |
---|---|---|
committer | SANKET KS <sx00562924@techmahindra.com> | 2024-07-08 06:04:42 +0000 |
commit | 989d7f3d6ae740e30480bfc7d49acfbaf014d393 (patch) | |
tree | 0604e03d4e6910f39d66f7240eb6b448e4d05b4c /cxf-logging/src | |
parent | 7100db88beb76d9f23accaad9d0ccd91f7633304 (diff) |
Upgrade SO to Java_17
-Removal of aff and logging-filter-base dependencies.
-CI build java17 branch-jdk17 version:https://gerrit.onap.org/r/c/ci-management/+/138252
Issue-ID: SO-4125
Change-ID: I58f07f888a814b999f92f8d89909b0666d0b9699
Signed-off-by: Sreeja Gattagouni <SG00744975@techmahindra.com>
Diffstat (limited to 'cxf-logging/src')
2 files changed, 3 insertions, 13 deletions
diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java index 1e1c8a7de1..7e48793780 100644 --- a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java +++ b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java @@ -24,14 +24,13 @@ package org.onap.so.logging.cxf.interceptor; import java.util.List; import java.util.Map; import java.util.UUID; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.apache.cxf.binding.soap.SoapMessage; import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.message.Message; import org.apache.cxf.phase.Phase; import org.apache.cxf.transport.http.AbstractHTTPDestination; -import org.onap.logging.filter.base.MDCSetup; import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,7 +48,6 @@ public class SOAPLoggingInInterceptor extends AbstractSoapInterceptor { @Override public void handleMessage(SoapMessage message) throws Fault { try { - MDCSetup mdcSetup = new MDCSetup(); Map<String, List<String>> headers = (Map<String, List<String>>) message.get(Message.PROTOCOL_HEADERS); HttpServletRequest request = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST); request.getRemoteAddr(); @@ -58,12 +56,6 @@ public class SOAPLoggingInInterceptor extends AbstractSoapInterceptor { setInvocationId(headers); setServiceName(message); setMDCPartnerName(headers); - mdcSetup.setServerFQDN(); - mdcSetup.setClientIPAddress(request); - mdcSetup.setInstanceID(); - mdcSetup.setEntryTimeStamp(); - mdcSetup.setLogTimestamp(); - mdcSetup.setElapsedTime(); MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, "INPROGRESS"); logger.info(ONAPLogConstants.Markers.ENTRY, "Entering"); } catch (Exception e) { @@ -108,3 +100,4 @@ public class SOAPLoggingInInterceptor extends AbstractSoapInterceptor { } } + diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java index a03637831a..ad7367249a 100644 --- a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java +++ b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java @@ -26,7 +26,6 @@ import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.message.Message; import org.apache.cxf.phase.Phase; -import org.onap.logging.filter.base.MDCSetup; import org.onap.logging.ref.slf4j.ONAPLogConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,7 +48,6 @@ public class SOAPLoggingOutInterceptor extends AbstractSoapInterceptor { @Override public void handleMessage(SoapMessage message) throws Fault { try { - MDCSetup mdcSetup = new MDCSetup(); Exception ex = message.getContent(Exception.class); if (ex == null) { MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, @@ -64,11 +62,10 @@ public class SOAPLoggingOutInterceptor extends AbstractSoapInterceptor { MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, ONAPLogConstants.ResponseStatus.ERROR.toString()); } - mdcSetup.setLogTimestamp(); - mdcSetup.setElapsedTime(); logger.info(ONAPLogConstants.Markers.EXIT, "Exiting"); } catch (Exception e) { logger.warn("Error in incoming SOAP Message Inteceptor", e); } } } + |