aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingOutInterceptor.java4
-rw-r--r--deployment-configs/src/main/resources/logger/logback-spring.xml2
2 files changed, 5 insertions, 1 deletions
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 3785d3165f..a03637831a 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,6 +26,7 @@ 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;
@@ -48,6 +49,7 @@ 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,
@@ -62,6 +64,8 @@ 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);
diff --git a/deployment-configs/src/main/resources/logger/logback-spring.xml b/deployment-configs/src/main/resources/logger/logback-spring.xml
index 0e8d0a8222..258382b834 100644
--- a/deployment-configs/src/main/resources/logger/logback-spring.xml
+++ b/deployment-configs/src/main/resources/logger/logback-spring.xml
@@ -27,7 +27,7 @@
<property name="currentTimeStamp" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;,UTC}"/>
<property name="errorPattern"
- value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName:-Unknown}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode:-900}|%X{ErrorDesc:-UnknownError}|%msg%nopex%n" />
+ value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%thread|%X{ServiceName:-Unknown}|%X{PartnerName}|%X{TargetEntity}|%X{TargetServiceName}|%.-5level|%X{ErrorCode:-900}|%X{ErrorDesc:-UnknownError}|%replace(%msg){'\n',' '}%nopex%n" />
<property name="debugPattern"
value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{RequestID}|%logger{50} - %msg%n" />