diff options
author | Michael O'Brien <frank.obrien@amdocs.com> | 2018-06-25 13:59:31 -0400 |
---|---|---|
committer | Michael O'Brien <frank.obrien@amdocs.com> | 2018-07-10 23:45:29 -0400 |
commit | 9eee6ac9daa5b82946b4f7c7eaa817ae3e1f4cab (patch) | |
tree | c92bf95da779589a1162044b4f77a51876fccb7b /reference/logging-slf4j/src/main | |
parent | 9aaa8f39949d7dc3d66888797951a20a7bced145 (diff) |
logging library use and k8s
Change-Id: I264f6dd5270543a216612c50fd5806458e0e806a
Issue-ID: LOG-135
Signed-off-by: Michael O'Brien <frank.obrien@amdocs.com>
Diffstat (limited to 'reference/logging-slf4j/src/main')
-rw-r--r-- | reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogAdapter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogAdapter.java b/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogAdapter.java index d26cd13..aafc74d 100644 --- a/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogAdapter.java +++ b/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogAdapter.java @@ -333,7 +333,8 @@ public class ONAPLogAdapter { // Default the service name to the requestURI, in the event that // no value has been provided. - if (MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME) == null) { + if (MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME) == null || + MDC.get(ONAPLogConstants.MDCs.SERVICE_NAME).equalsIgnoreCase(EMPTY_MESSAGE)) { MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, request.getRequestURI()); } |