summaryrefslogtreecommitdiffstats
path: root/reference/logging-filter
diff options
context:
space:
mode:
authorBrittany Plummer (bp896r) <bp896r@att.com>2019-12-16 14:58:20 -0500
committerBrittany Plummer (bp896r) <bp896r@att.com>2019-12-16 14:58:20 -0500
commitc527140c4c949851f035fb8f4c9c80779aa01bc2 (patch)
tree9d5e1a1cdf975a28f1358a61b09ee7f7797326e7 /reference/logging-filter
parentade7ef267161cb22cc2834e44dc6bde0597884f5 (diff)
Removed check for X-ClientID header when setting partnerName
Issue-ID: LOG-1191 Change-Id: I4247085b89f25d8bb244fa43a18a81c8ff35aff8 Signed-off-by: Brittany Plummer (bp896r) <bp896r@att.com>
Diffstat (limited to 'reference/logging-filter')
-rw-r--r--reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/Constants.java1
-rw-r--r--reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java6
-rw-r--r--reference/logging-filter/logging-filter-base/src/test/java/org/onap/logging/filter/base/MDCSetupTest.java11
3 files changed, 0 insertions, 18 deletions
diff --git a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/Constants.java b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/Constants.java
index be28f0b..2da32e1 100644
--- a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/Constants.java
+++ b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/Constants.java
@@ -35,7 +35,6 @@ public class Constants {
public static final String TRANSACTION_ID = "X-TransactionID";
public static final String ECOMP_REQUEST_ID = "X-ECOMP-RequestID";
public static final String ONAP_REQUEST_ID = "X-ONAP-RequestID";
- public static final String CLIENT_ID = "X-ClientID";
public static final String INVOCATION_ID_HEADER = "X-InvocationID";
public static final String TARGET_ENTITY_HEADER = "X-Target-Entity";
}
diff --git a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java
index d600a2c..983c719 100644
--- a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java
+++ b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/MDCSetup.java
@@ -143,12 +143,6 @@ public class MDCSetup {
return partnerName;
}
- logger.trace(checkHeaderLogPattern, Constants.HttpHeaders.CLIENT_ID, ONAPLogConstants.MDCs.PARTNER_NAME);
- partnerName = headers.get(Constants.HttpHeaders.CLIENT_ID);
- if (partnerName != null && !partnerName.isEmpty()) {
- return partnerName;
- }
-
logger.trace("{} value could not be determined, defaulting partnerName to {}.",
ONAPLogConstants.MDCs.PARTNER_NAME, Constants.DefaultValues.UNKNOWN);
return Constants.DefaultValues.UNKNOWN;
diff --git a/reference/logging-filter/logging-filter-base/src/test/java/org/onap/logging/filter/base/MDCSetupTest.java b/reference/logging-filter/logging-filter-base/src/test/java/org/onap/logging/filter/base/MDCSetupTest.java
index 6340ef1..5da50a4 100644
--- a/reference/logging-filter/logging-filter-base/src/test/java/org/onap/logging/filter/base/MDCSetupTest.java
+++ b/reference/logging-filter/logging-filter-base/src/test/java/org/onap/logging/filter/base/MDCSetupTest.java
@@ -225,17 +225,6 @@ public class MDCSetupTest extends MDCSetup {
}
@Test
- public void setMDCPartnerNameClientIdHeaderTest() {
- MultivaluedMap<String, String> headerMap = new MultivaluedHashMap<>();
- headerMap.putSingle(Constants.HttpHeaders.CLIENT_ID, "SO");
- SimpleMap headers = new SimpleJaxrsHeadersMap(headerMap);
-
- setMDCPartnerName(headers);
-
- assertEquals("SO", MDC.get(ONAPLogConstants.MDCs.PARTNER_NAME));
- }
-
- @Test
public void setMDCPartnerNameNoHeaderTest() {
MultivaluedMap<String, String> headerMap = new MultivaluedHashMap<>();
SimpleMap headers = new SimpleJaxrsHeadersMap(headerMap);