summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aai-resources/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/aai-resources/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java b/aai-resources/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
index 050283d..b1177f6 100644
--- a/aai-resources/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
+++ b/aai-resources/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
@@ -46,6 +46,7 @@ import org.openecomp.aai.util.HbaseSaltPrefixer;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
+import org.slf4j.MDC;
public class AAILogJAXRSInInterceptor extends JAXRSInInterceptor {
@@ -216,8 +217,21 @@ public class AAILogJAXRSInInterceptor extends JAXRSInInterceptor {
} else if (replacedTransId) {
logMsg = "Replaced invalid requestID of " + transId + " Assigned " + newTransId;
}
- }
-
+ MDC.put("RequestId",newTransId);
+ }
+ else {
+ MDC.put("RequestId",transId);
+ }
+
+ List<String> fromAppIdList = headersList.get("X-FromAppId");
+ if (fromAppIdList != null) {
+ String fromAppId = null;
+ for (String fromAppIdValue : fromAppIdList) {
+ fromAppId = fromAppIdValue;
+ }
+ MDC.put("PartnerName",fromAppId);
+ }
+
List<String> contentType = headersList.get("Content-Type");
if (contentType == null) {
ct = (String)message.get(Message.CONTENT_TYPE);