diff options
author | 2020-10-11 21:24:18 -0500 | |
---|---|---|
committer | 2020-10-11 23:17:11 -0500 | |
commit | 969d2d7c2caed78d297ccf8e0ebc9120831c18b0 (patch) | |
tree | d0cf1ff7f4c99c0bc30d28bab41b9a7729cc19e1 /openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java | |
parent | f99f3b921b20c8794b8b37b3926f7221b164338b (diff) |
Add InvocationID to p_mdc field in audit logs
Add InvocationID in SLF4JLoggerWrapper for audit entry and exit
Issue-ID: SDC-3312
Change-Id: Id19dd3cfff75a23f14d0a1d22520a2e967e46289
Signed-off-by: nrpandya <neenendra.pandya@att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java')
-rw-r--r-- | openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/slf4j/SLF4JLoggerWrapperTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/slf4j/SLF4JLoggerWrapperTest.java b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/slf4j/SLF4JLoggerWrapperTest.java index 2b98fc898f..6785c15355 100644 --- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/slf4j/SLF4JLoggerWrapperTest.java +++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/src/test/java/org/openecomp/sdc/logging/slf4j/SLF4JLoggerWrapperTest.java @@ -221,6 +221,13 @@ public class SLF4JLoggerWrapperTest { } @Test + public void auditInvocationIdAvailable() { + SpyLogger spy = createSpy(); + new SLF4JLoggerWrapper(spy).auditExit(AuditData.builder().build()); + assertNotNull(spy.mdc().get(AuditField.INVOCATION_ID.asKey())); + } + + @Test public void metricsTargetEntityAvailableWhenPassed() { final String targetEntity = "MetricsTargetEntity"; SpyLogger spy = createSpy(); |