aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal
diff options
context:
space:
mode:
authorTian Lee <TianL@amdocs.com>2017-09-25 09:05:49 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-25 09:05:49 +0000
commit5d3a2fc76a1561eae294cc1e140a72aa8e282b47 (patch)
tree72f118474ccf717b95317288c4027f060b78a8f5 /aai-traversal
parentdaceaa12ab1d055a087ffcd4fe16167d36eda0d4 (diff)
parent75ea836990332d1d8797e0e2ec10820d628c95b3 (diff)
Merge "Add RequestId and PartnerName in log"
Diffstat (limited to 'aai-traversal')
-rw-r--r--aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java b/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
index dd718de..8a9362e 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
+++ b/aai-traversal/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,22 @@ 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);