From a969489e138c6fa44d468f05e8b27860c26c7578 Mon Sep 17 00:00:00 2001 From: mmis Date: Tue, 27 Feb 2018 14:05:23 +0000 Subject: Added junit tests in ONAP-Logging Added junit tests to org.onap.policy.common.logging.flexlogger package in ONAP-Logging Issue-ID: POLICY-582 Change-Id: I024f990960fa71bff7655da9c2cd5dd0db8ee33c Signed-off-by: mmis --- .../java/org/onap/policy/common/logging/flexlogger/Logger4J.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger4J.java') diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger4J.java b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger4J.java index 30349d5c..555620f2 100644 --- a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger4J.java +++ b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger4J.java @@ -24,6 +24,7 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.util.Arrays; import java.util.UUID; import org.apache.log4j.Logger; @@ -316,7 +317,7 @@ public class Logger4J implements org.onap.policy.common.logging.flexlogger.Logge */ @Override public void error(MessageCodes msg, Throwable arg0, String... arguments){ - log.error(transId + "|" + className +"|" + "MessageCodes :" + msg + arguments); + log.error(transId + "|" + className +"|" + "MessageCodes :" + msg + Arrays.asList(arguments)); } @@ -327,7 +328,7 @@ public class Logger4J implements org.onap.policy.common.logging.flexlogger.Logge */ @Override public void error(MessageCodes msg, String... arguments){ - log.error(transId + "|" + className +"|" + "MessageCode:" + msg + arguments); + log.error(transId + "|" + className +"|" + "MessageCode:" + msg + Arrays.asList(arguments)); } /** @@ -351,7 +352,7 @@ public class Logger4J implements org.onap.policy.common.logging.flexlogger.Logge */ @Override public void warn(MessageCodes msg, String... arguments){ - log.warn(className +"|" +"MessageCodes:" + msg + arguments); + log.warn(className +"|" +"MessageCodes:" + msg + Arrays.asList(arguments)); } /** @@ -362,7 +363,7 @@ public class Logger4J implements org.onap.policy.common.logging.flexlogger.Logge */ @Override public void warn(MessageCodes msg, Throwable arg0, String... arguments){ - log.warn(className +"|" +"MessageCodes:" + msg + arguments); + log.warn(className +"|" +"MessageCodes:" + msg + Arrays.asList(arguments)); } /** -- cgit 1.2.3-korg