diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/OnapLoggingUtils.java b/common-logging/src/main/java/org/onap/policy/common/logging/OnapLoggingUtils.java
index 6c0879e..9bfbe68 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/OnapLoggingUtils.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/OnapLoggingUtils.java
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-Logging
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,4 +60,41 @@
         return requestContext;
     }
 
+    /**
+     * Create message text replace {} place holder with data
+     * if last argument is throwable/exception, pass it as argument to logger.
+     * @param format message format can contains text and {}
+     * @param arguments output arguments
+     * @return
+     */
+    public static String formatMessage(String format, Object ...arguments) {
+        if (arguments.length <= 0 || arguments[0] == null) {
+            return format;
+        }
+        int index;
+        StringBuilder builder = new StringBuilder();
+        String[] token = format.split("[{][}]");
+        for (index = 0; index < arguments.length; index++) {
+            if (index < token.length) {
+                builder.append(token[index]);
+                builder.append(arguments[index]);
+            } else {
+                break;
+            }
+        }
+        for (int index2 = index; index2 < token.length; index2++) {
+            builder.append(token[index2]);
+        }
+
+        return builder.toString();
+    }
+
+    /**
+     * Check object is throwable.
+     * @param obj to verify
+     * @return true if object is throwable or false otherwise
+     */
+    public static boolean isThrowable(Object obj) {
+        return (obj instanceof Throwable);
+    }
 }
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
index 9e5fd5a..8de057f 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java
@@ -54,6 +54,7 @@
 import java.text.SimpleDateFormat;
 import java.time.Duration;
 import java.time.Instant;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.Map;
@@ -63,6 +64,7 @@
 import java.util.concurrent.ConcurrentMap;
 import java.util.function.Consumer;
 import org.apache.commons.lang3.StringUtils;
+import org.onap.policy.common.logging.OnapLoggingUtils;
 import org.onap.policy.common.logging.flexlogger.LoggerType;
 import org.slf4j.MDC;
 
@@ -331,7 +333,6 @@
      * Set Timestamps for start, end and duration of logging a transaction.
      */
     private static void seTimeStamps() {
-
         MDC.put(MDC_INSTANCE_UUID, "");
         MDC.put(MDC_ALERT_SEVERITY, "");
 
@@ -433,18 +434,6 @@
     }
 
     /**
-     * Records only one String message with its class name.
-     *
-     * @param className the class name
-     * @param arg0 the message
-     */
-    public static void info(String className, String arg0) {
-        MDC.put(classNameProp, className);
-        debugLogger.info(MessageCodes.GENERAL_INFO, arg0);
-    }
-
-
-    /**
      * Records only one String message.
      *
      * @param arg0 the message
@@ -483,14 +472,29 @@
     }
 
     /**
-     * Records only one String message with its class name.
+     * Records a message with passed in message text and variable number of arguments.
      *
-     * @param arg0 log message
-     * @param className class name
+     * @param message class name if one argument, otherwise message text
+     * @param arguments variable number of arguments
      */
-    public static void warn(String className, String arg0) {
-        MDC.put(classNameProp, className);
-        debugLogger.warn(MessageCodes.GENERAL_INFO, arg0);
+    public static void info(String message, Object... arguments) {
+        if (!debugLogger.isInfoEnabled()) {
+            return;
+        }
+        if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {
+            MDC.put(classNameProp, message);
+            debugLogger.info(MessageCodes.GENERAL_INFO,
+                arguments[0] == null ? "" : arguments[0].toString());
+            return;
+        }
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            String arguments2 = getNormalizedStackTrace((Throwable)arguments[0], "");
+            debugLogger.info(MessageCodes.GENERAL_INFO, message + arguments2);
+            return;
+        }
+
+        MDC.put(classNameProp, "");
+        debugLogger.info(message, arguments);
     }
 
     /**
@@ -553,15 +557,28 @@
     }
 
     /**
-     * Records only one String message with its class name.
+     * Records a message with passed in message text and variable number of arguments.
      *
-     * @param className class name
-     * @param arg0 log message
+     * @param message class name if one argument, otherwise message text
+     * @param arguments variable number of arguments
      */
-    public static void error(String className, String arg0) {
-        MDC.put(classNameProp, className);
-        setErrorCode(MessageCodes.GENERAL_ERROR);
-        errorLogger.error(MessageCodes.GENERAL_ERROR, arg0);
+    public static void warn(String message, Object... arguments) {
+        if (!debugLogger.isWarnEnabled()) {
+            return;
+        }
+        if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {
+            MDC.put(classNameProp, message);
+            debugLogger.warn(MessageCodes.GENERAL_INFO,
+                arguments[0] == null ? "" : arguments[0].toString());
+            return;
+        }
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            String arguments2 = getNormalizedStackTrace((Throwable)arguments[0], "");
+            debugLogger.warn(MessageCodes.GENERAL_INFO, message + arguments2);
+            return;
+        }
+        MDC.put(classNameProp, "");
+        debugLogger.warn(message, arguments);
     }
 
     /**
@@ -629,6 +646,33 @@
     }
 
     /**
+     * Records a message with passed in message text and variable number of arguments.
+     *
+     * @param message class name if one argument, otherwise message text
+     * @param arguments variable number of arguments
+     */
+    public static void error(String message, Object... arguments) {
+        if (!errorLogger.isErrorEnabled()) {
+            return;
+        }
+        if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {
+            MDC.put(classNameProp, message);
+            setErrorCode(MessageCodes.GENERAL_ERROR);
+            errorLogger.error(MessageCodes.GENERAL_ERROR,
+                arguments[0] == null ? "" : arguments[0].toString());
+            return;
+        }
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            String arguments2 = getNormalizedStackTrace((Throwable)arguments[0], "");
+            errorLogger.error(MessageCodes.GENERAL_ERROR, message + arguments2);
+            return;
+        }
+        MDC.put(classNameProp, "");
+        setErrorCode(MessageCodes.GENERAL_ERROR);
+        errorLogger.error(message, arguments);
+    }
+
+    /**
      * Records a message with passed in message code and a list of string values.
      *
      * @param msg the message code
@@ -640,17 +684,6 @@
     }
 
     /**
-     * Records only one String message with its class name.
-     *
-     * @param className the class name
-     * @param arg0 the message
-     */
-    public static void debug(String className, String arg0) {
-        MDC.put(classNameProp, className);
-        debugLogger.debug(MessageCodes.GENERAL_INFO, arg0);
-    }
-
-    /**
      * Records only one String message.
      *
      * @param arg0 the message
@@ -700,17 +733,28 @@
     }
 
     /**
-     * Records only one String message with its class name.
+     * Records a message with passed in message text and variable number of arguments.
      *
-     * @param className the class name
-     * @param arg0 the message
+     * @param message class name if one argument, otherwise message text
+     * @param arguments variable number of arguments
      */
-    public static void audit(String className, Object arg0) {
-        MDC.put(INVOCATION_ID, MDC.get(MDC_KEY_REQUEST_ID));
-        MDC.put(STATUS_CODE, COMPLETE_STATUS);
-        MDC.put(RESPONSE_CODE, "0");
-        MDC.put(classNameProp, className);
-        auditLogger.info("" + arg0);
+    public static void debug(String message, Object... arguments) {
+        if (!debugLogger.isDebugEnabled()) {
+            return;
+        }
+        if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {
+            MDC.put(classNameProp, message);
+            debugLogger.debug(MessageCodes.GENERAL_INFO,
+                arguments[0] == null ? "" : arguments[0].toString());
+            return;
+        }
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            String arguments2 = getNormalizedStackTrace((Throwable)arguments[0], "");
+            debugLogger.debug(MessageCodes.GENERAL_INFO, message + arguments2);
+            return;
+        }
+        MDC.put(classNameProp, "");
+        debugLogger.debug(message, arguments);
     }
 
     /**
@@ -727,6 +771,29 @@
     }
 
     /**
+     * Records a message with passed in message text and variable number of arguments.
+     *
+     * @param message class name if one argument, otherwise message text
+     * @param arguments variable number of arguments
+     */
+    public static void audit(String message, Object... arguments) {
+        if (!auditLogger.isInfoEnabled()) {
+            return;
+        }
+        MDC.put(INVOCATION_ID, postMdcInfoForEvent(null));
+        MDC.put(STATUS_CODE, COMPLETE_STATUS);
+        MDC.put(RESPONSE_CODE, "0");
+        if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {
+            MDC.put(classNameProp, message);
+            auditLogger.info(arguments[0] == null ? "" : arguments[0].toString());
+            return;
+        }
+
+        MDC.put(classNameProp, "");
+        auditLogger.info(message, arguments);
+    }
+
+    /**
      * returns true for enabled, false for not enabled.
      */
     public static boolean isDebugEnabled() {
@@ -1093,6 +1160,7 @@
      * @param arg0 the message
      */
     public static void metrics(String arg0) {
+        seTimeStamps();
         MDC.put(INVOCATION_ID, MDC.get(MDC_KEY_REQUEST_ID));
         MDC.put(RESPONSE_CODE, "0");
         String serviceName = MDC.get(MDC_SERVICE_NAME);
@@ -1100,20 +1168,6 @@
     }
 
     /**
-     * Records the metrics event with a class name and a String message.
-     *
-     * @param arg0 the message
-     */
-    public static void metrics(String className, Object arg0) {
-        seTimeStamps();
-        MDC.put(INVOCATION_ID, MDC.get(MDC_KEY_REQUEST_ID));
-        MDC.put(RESPONSE_CODE, "0");
-        MDC.put(classNameProp, className);
-        String serviceName = MDC.get(MDC_SERVICE_NAME);
-        metricsLogger.info(MessageCodes.RULE_METRICS_INFO, serviceName, "" + arg0);
-    }
-
-    /**
      * Records the metrics event with a String message.
      *
      * @param arg0 the message
@@ -1128,6 +1182,36 @@
     }
 
     /**
+     * Records a message with passed in message text and variable number of arguments.
+     *
+     * @param message class name if one argument, otherwise message text
+     * @param arguments variable number of arguments
+     */
+    public static void metrics(String message, Object... arguments) {
+        if (!metricsLogger.isInfoEnabled()) {
+            return;
+        }
+        seTimeStamps();
+        MDC.put(INVOCATION_ID, MDC.get(MDC_KEY_REQUEST_ID));
+        MDC.put(RESPONSE_CODE, "0");
+        if (arguments.length == 1 && !OnapLoggingUtils.isThrowable(arguments[0])) {
+            MDC.put(classNameProp, message);
+            String serviceName = MDC.get(MDC_SERVICE_NAME);
+            metricsLogger.info(MessageCodes.RULE_METRICS_INFO, serviceName,
+                arguments[0] == null ? "" : arguments[0].toString());
+            return;
+        }
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            String arguments2 = getNormalizedStackTrace((Throwable)arguments[0], "");
+            metricsLogger.info(MessageCodes.RULE_METRICS_INFO, message + arguments2);
+            return;
+        }
+
+        MDC.put(classNameProp, "");
+        metricsLogger.info(message, arguments);
+    }
+
+    /**
      * Records the metrics event with a String message.
      *
      * @param arg0 the message
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/EelfLogger.java b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/EelfLogger.java
index a3e5cc8..df60fa9 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/EelfLogger.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/EelfLogger.java
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-Logging
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -166,6 +166,17 @@
     }
 
     /**
+     * Records a message.
+     *
+     * @param message the message
+     * @param arguments the arguments for message
+     */
+    @Override
+    public void debug(String message, Object... arguments) {
+        PolicyLogger.debug(message, arguments);
+    }
+
+    /**
      * Records an error message.
      *
      * @param message the message
@@ -210,6 +221,17 @@
     }
 
     /**
+     * Records an error message.
+     *
+     * @param message the message
+     * @param arguments the arguments for message
+     */
+    @Override
+    public void error(String message, Object... arguments) {
+        PolicyLogger.error(message, arguments);
+    }
+
+    /**
      * Records a message.
      *
      * @param message the message
@@ -234,6 +256,17 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments the arguments for message
+     */
+    @Override
+    public void info(String message, Object... arguments) {
+        PolicyLogger.info(message, arguments);
+    }
+
+    /**
+     * Records a message.
+     *
+     * @param message the message
      */
     @Override
     public void warn(Object message) {
@@ -278,6 +311,17 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments the arguments for message
+     */
+    @Override
+    public void warn(String message, Object... arguments) {
+        PolicyLogger.warn(message, arguments);
+    }
+
+    /**
+     * Records a message.
+     *
+     * @param message the message
      */
     @Override
     public void trace(Object message) {
@@ -387,6 +431,17 @@
     }
 
     /**
+     * Records a message.
+     *
+     * @param message the message
+     * @param arguments the arguments for message
+     */
+    @Override
+    public void audit(String message, Object... arguments) {
+        PolicyLogger.audit(message, arguments);
+    }
+
+    /**
      * Records an audit message.
      *
      * @param eventId the event ID
@@ -485,6 +540,17 @@
     }
 
     /**
+     * Records a message.
+     *
+     * @param message the message
+     * @param arguments the arguments for message
+     */
+    @Override
+    public void metrics(String message, Object... arguments) {
+        PolicyLogger.metrics(message, arguments);
+    }
+
+    /**
      * Populates MDC Info.
      *
      * @param transId the transaction ID
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger.java b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger.java
index d6f020e..315cd93 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/Logger.java
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-Logging
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,6 +41,11 @@
     public void debug(Object message, Throwable throwable);
 
     /**
+     * Prints messages with the level.DEBUG
+     */
+    public void debug(String message, Object... arguments);
+
+    /**
      * Prints messages with the level.ERROR
      */
     public void error(Object message);
@@ -61,6 +66,11 @@
     public void error(MessageCodes msg, Throwable arg0, String... arguments);
 
     /**
+     * Prints messages with the level.ERROR
+     */
+    public void error(String message, Object... arguments);
+
+    /**
      * Prints messages with the level.INFO
      */
     public void info(Object message);
@@ -71,6 +81,11 @@
     public void info(Object message, Throwable throwable);
 
     /**
+     * Prints messages with the level.INFO
+     */
+    public void info(String message, Object... arguments);
+
+    /**
      * Prints messages with the level.WARN
      */
     public void warn(Object message);
@@ -91,6 +106,11 @@
     public void warn(MessageCodes msg, Throwable arg0, String... arguments);
 
     /**
+     * Prints messages with the level.WARN
+     */
+    public void warn(String message, Object... arguments);
+
+    /**
      * Prints messages with the level.TRACE
      */
     public void trace(Object message);
@@ -111,6 +131,11 @@
     public void audit(Object arg0, Throwable throwable);
 
     /**
+     * Prints messages in audit log with the level.INFO
+     */
+    public void audit(String message, Object... arguments);
+
+    /**
      * Records event Id in audit log with the level.INFO
      */
     public void recordAuditEventStart(String eventId);
@@ -157,6 +182,11 @@
     public void metrics(Object arg0);
 
     /**
+     * Records the Metrics log message.
+     */
+    public void metrics(String message, Object... arguments);
+
+    /**
      * Returns a boolean value, true for debug logging enabled, false for not enabled.
      */
     public boolean isDebugEnabled();
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 5af40b0..bb5e114 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
@@ -33,6 +33,7 @@
 
 import org.apache.log4j.Logger;
 import org.apache.log4j.Priority;
+import org.onap.policy.common.logging.OnapLoggingUtils;
 import org.onap.policy.common.logging.eelf.MessageCodes;
 import org.onap.policy.common.logging.eelf.PolicyLogger;
 
@@ -115,6 +116,21 @@
     }
 
     /**
+     * Records a message.
+     *
+     * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void debug(String message, Object... arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            log.debug(message, (Throwable)arguments[0]);
+        } else {
+            log.debug(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
      * Records an error message.
      *
      * @param message the message
@@ -163,6 +179,21 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void error(String message, Object... arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            log.error(message, (Throwable)arguments[0]);
+        } else {
+            log.error(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
+     * Records a message.
+     *
+     * @param message the message
      */
     @Override
     public void info(Object message) {
@@ -184,6 +215,21 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void info(String message, Object... arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            log.info(message, (Throwable)arguments[0]);
+        } else {
+            log.info(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
+     * Records a message.
+     *
+     * @param message the message
      */
     @Override
     public void warn(Object message) {
@@ -228,6 +274,21 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void warn(String message, Object... arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            log.warn(message, (Throwable)arguments[0]);
+        } else {
+            log.warn(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
+     * Records a message.
+     *
+     * @param message the message
      */
     @Override
     public void trace(Object message) {
@@ -333,6 +394,21 @@
     /**
      * Records an audit message.
      *
+     * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void audit(String message, Object... arguments) {
+        if (arguments.length == 1) {
+            log.info(message, (Throwable)arguments[0]);
+        } else {
+            log.info(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
+     * Records an audit message.
+     *
      * @param eventId the event ID
      */
     @Override
@@ -444,6 +520,22 @@
     }
 
     /**
+     * Records a metrics message.
+     *
+     * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void metrics(String message, Object... arguments) {
+        if (arguments.length > 0 && OnapLoggingUtils.isThrowable(arguments[arguments.length - 1])) {
+            log.info(OnapLoggingUtils.formatMessage(message, arguments),
+                (Throwable)arguments[arguments.length - 1]);
+        } else {
+            log.info(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
      * Returns transaction Id.
      *
      * @param transId the transaction ID
@@ -511,4 +603,5 @@
         // look up associated logger
         log = Logger.getLogger(className);
     }
+
 }
diff --git a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/SystemOutLogger.java b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/SystemOutLogger.java
index f7a68a3..bc7633d 100644
--- a/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/SystemOutLogger.java
+++ b/common-logging/src/main/java/org/onap/policy/common/logging/flexlogger/SystemOutLogger.java
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP-Logging
  * ================================================================================
- * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@
 import java.util.Arrays;
 import java.util.UUID;
 
+import org.onap.policy.common.logging.OnapLoggingUtils;
 import org.onap.policy.common.logging.eelf.MessageCodes;
 import org.onap.policy.common.logging.eelf.PolicyLogger;
 
@@ -152,6 +153,21 @@
     }
 
     /**
+     * Records a message.
+     *
+     * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void debug(String message, Object...arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            displayMessage(transId + "|" + className + " : " + message + ":" + arguments[0]);
+        } else {
+            displayMessage(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
      * Records an error message.
      *
      * @param message the message
@@ -193,11 +209,25 @@
      */
     @Override
     public void error(MessageCodes msg, String... arguments) {
-
         displayMessage(transId + "|" + className + " : " + "MessageCode:" + msg + Arrays.asList(arguments));
     }
 
     /**
+     * Records a error message.
+     *
+     * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void error(String message, Object...arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            displayMessage(transId + "|" + className + " : " + message + ":" + arguments[0]);
+        } else {
+            displayMessage(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
      * Records a message.
      *
      * @param message the message
@@ -222,21 +252,25 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments variable number of arguments
      */
     @Override
-    public void warn(Object message) {
-        displayMessage(transId + "|" + className + " : " + message);
+    public void info(String message, Object...arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            displayMessage(transId + "|" + className + " : " + message + ":" + arguments[0]);
+        } else {
+            displayMessage(OnapLoggingUtils.formatMessage(message, arguments));
+        }
     }
 
     /**
      * Records a message.
      *
      * @param message the message
-     * @param throwable the throwable
      */
     @Override
-    public void warn(Object message, Throwable throwable) {
-        displayMessage(transId + "|" + className + " : " + message + ":" + throwable);
+    public void warn(Object message) {
+        displayMessage(transId + "|" + className + " : " + message);
     }
 
     /**
@@ -254,6 +288,17 @@
     /**
      * Records a message.
      *
+     * @param message the message
+     * @param throwable the throwable
+     */
+    @Override
+    public void warn(Object message, Throwable throwable) {
+        displayMessage(transId + "|" + className + " : " + message + ":" + throwable);
+    }
+
+    /**
+     * Records a message.
+     *
      * @param msg the message code
      * @param throwable the throwable
      * @param arguments the messages
@@ -269,6 +314,21 @@
      * Records a message.
      *
      * @param message the message
+     * @param arguments variable number of arguments
+     */
+    @Override
+    public void warn(String message, Object...arguments) {
+        if (arguments.length == 1 && OnapLoggingUtils.isThrowable(arguments[0])) {
+            displayMessage(transId + "|" + className + " : " + message + ":" + arguments[0]);
+        } else {
+            displayMessage(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
+     * Records a message.
+     *
+     * @param message the message
      */
     @Override
     public void trace(Object message) {
@@ -373,6 +433,20 @@
     /**
      * Records an audit message.
      *
+     * @param message the message
+     */
+    @Override
+    public void audit(String message, Object... arguments) {
+        if (arguments.length == 1) {
+            displayMessage(transId + "|" + className + " : " + message + ":" + arguments[0]);
+        } else {
+            displayMessage(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
+     * Records an audit message.
+     *
      * @param eventId the event ID
      */
     @Override
@@ -480,6 +554,21 @@
     }
 
     /**
+     * Records a metrics message.
+     *
+     * @param message the message
+     * @param arguments the arguments
+     */
+    @Override
+    public void metrics(String message, Object... arguments) {
+        if (arguments.length == 1) {
+            displayMessage(className + " : " + message + " : " + arguments[0]);
+        } else {
+            displayMessage(OnapLoggingUtils.formatMessage(message, arguments));
+        }
+    }
+
+    /**
      * Returns transaction Id.
      *
      * @param transId the transaction ID
diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java
index b318c18..adb7d36 100644
--- a/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java
+++ b/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java
@@ -36,6 +36,8 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
 import static org.onap.policy.common.logging.eelf.OnapConfigProperties.PARTNER_NAME;
 import static org.onap.policy.common.logging.eelf.OnapConfigProperties.RESPONSE_CODE;
 import static org.onap.policy.common.logging.eelf.OnapConfigProperties.RESPONSE_DESCRIPTION;
@@ -200,6 +202,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         PolicyLogger.info("str1", "str2");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isInfoEnabled()).thenReturn(true);
+        PolicyLogger.info("str1", "str2");
         Mockito.verify(mockLogger).info(MessageCodes.GENERAL_INFO, "str2");
     }
 
@@ -243,6 +248,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         PolicyLogger.warn("str1", "str2");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isWarnEnabled()).thenReturn(true);
+        PolicyLogger.warn("str1", "str2");
         Mockito.verify(mockLogger).warn(MessageCodes.GENERAL_INFO, "str2");
     }
 
@@ -286,6 +294,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "errorLogger", mockLogger);
         PolicyLogger.error("str1", "str2");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isErrorEnabled()).thenReturn(true);
+        PolicyLogger.error("str1", "str2");
         Mockito.verify(mockLogger).error(MessageCodes.GENERAL_ERROR, "str2");
         assertEquals("500", MDC.get("ErrorCode"));
         assertEquals("This is a general error message during the process. Please check the error message for detail "
@@ -356,6 +367,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         PolicyLogger.debug("str1", "str2");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isDebugEnabled()).thenReturn(true);
+        PolicyLogger.debug("str1", "str2");
         Mockito.verify(mockLogger).debug(MessageCodes.GENERAL_INFO, "str2");
     }
 
@@ -380,6 +394,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "auditLogger", mockLogger);
         PolicyLogger.audit("PolicyLoggerTest", 1);
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isInfoEnabled()).thenReturn(true);
+        PolicyLogger.audit("PolicyLoggerTest", 1);
         assertEquals("PolicyLoggerTest", MDC.get("ClassName"));
         assertEquals("COMPLETE", MDC.get("StatusCode"));
         Mockito.verify(mockLogger).info("1");
@@ -591,6 +608,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "metricsLogger", mockLogger);
         PolicyLogger.metrics("PolicyLoggerTest", 1);
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isInfoEnabled()).thenReturn(true);
+        PolicyLogger.metrics("PolicyLoggerTest", 1);
         Mockito.verify(mockLogger).info(Mockito.eq(MessageCodes.RULE_METRICS_INFO), Mockito.anyString(),
                 Mockito.eq("1"));
     }
diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/EelfLoggerTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/EelfLoggerTest.java
index d3c09ee..1245e16 100644
--- a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/EelfLoggerTest.java
+++ b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/EelfLoggerTest.java
@@ -3,7 +3,7 @@
  * ONAP-Logging
  * ================================================================================
  * Copyright (C) 2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.never;
 
 import com.att.eelf.configuration.EELFLogger;
 import java.util.UUID;
@@ -93,6 +94,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         eelfLogger.debug("message");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isDebugEnabled()).thenReturn(true);
+        eelfLogger.debug("message");
         Mockito.verify(mockLogger).debug(MessageCodes.GENERAL_INFO, "message");
     }
 
@@ -101,6 +105,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "errorLogger", mockLogger);
         eelfLogger.error("message");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isErrorEnabled()).thenReturn(true);
+        eelfLogger.error("message");
         Mockito.verify(mockLogger).error(MessageCodes.GENERAL_ERROR, "message");
     }
 
@@ -109,6 +116,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         eelfLogger.info("message");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isInfoEnabled()).thenReturn(true);
+        eelfLogger.info("message");
         Mockito.verify(mockLogger).info(MessageCodes.GENERAL_INFO, "message");
     }
 
@@ -117,6 +127,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         eelfLogger.warn("message");
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isWarnEnabled()).thenReturn(true);
+        eelfLogger.warn("message");
         Mockito.verify(mockLogger).warn(MessageCodes.GENERAL_INFO, "message");
     }
 
@@ -219,6 +232,8 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "debugLogger", mockLogger);
         eelfLogger.info("message", new NullPointerException());
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isInfoEnabled()).thenReturn(true);
         Mockito.verify(mockLogger).info((MessageCodes) Mockito.any(),
                 Mockito.startsWith("message:java.lang.NullPointerException"));
     }
@@ -317,6 +332,9 @@
         EELFLogger mockLogger = Mockito.mock(EELFLogger.class);
         Whitebox.setInternalState(PolicyLogger.class, "metricsLogger", mockLogger);
         eelfLogger.metrics(1);
+        Mockito.verify(mockLogger, never()).info(Mockito.anyString(), Mockito.anyString());
+        Mockito.when(mockLogger.isInfoEnabled()).thenReturn(true);
+        eelfLogger.metrics(1);
         Mockito.verify(mockLogger).info(Mockito.eq(MessageCodes.RULE_METRICS_INFO), Mockito.anyString(),
                 Mockito.eq("1"));
     }
diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/SystemOutLoggerTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/SystemOutLoggerTest.java
index ca73d1c..cde423f 100644
--- a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/SystemOutLoggerTest.java
+++ b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/SystemOutLoggerTest.java
@@ -427,7 +427,7 @@
         try {
             System.setOut(ps);
             systemOutLogger.setTransId("transactionId");
-            systemOutLogger.debug(1, new NullPointerException());
+            systemOutLogger.debug("1", new NullPointerException());
             assertTrue(baos.toString(),
                     baos.toString().contains("transactionId|SystemOutLoggerTest : 1:java.lang.NullPointerException"));
         } finally {
@@ -444,7 +444,7 @@
         try {
             System.setOut(ps);
             systemOutLogger.setTransId("transactionId");
-            systemOutLogger.error(1, new NullPointerException());
+            systemOutLogger.error("1", new NullPointerException());
             assertTrue(baos.toString(),
                     baos.toString().contains("transactionId|SystemOutLoggerTest : 1:java.lang.NullPointerException"));
         } finally {
@@ -461,7 +461,7 @@
         try {
             System.setOut(ps);
             systemOutLogger.setTransId("transactionId");
-            systemOutLogger.info(1, new NullPointerException());
+            systemOutLogger.info("1", new NullPointerException());
             assertTrue(baos.toString(),
                     baos.toString().contains("transactionId|SystemOutLoggerTest : 1:java.lang.NullPointerException"));
         } finally {
@@ -478,7 +478,7 @@
         try {
             System.setOut(ps);
             systemOutLogger.setTransId("transactionId");
-            systemOutLogger.warn(1, new NullPointerException());
+            systemOutLogger.warn("1", new NullPointerException());
             assertTrue(baos.toString(),
                     baos.toString().contains("transactionId|SystemOutLoggerTest : 1:java.lang.NullPointerException"));
         } finally {
@@ -512,7 +512,7 @@
         try {
             System.setOut(ps);
             systemOutLogger.setTransId("transactionId");
-            systemOutLogger.audit(1, new NullPointerException());
+            systemOutLogger.audit("1", new NullPointerException());
             assertTrue(baos.toString(),
                     baos.toString().contains("transactionId|SystemOutLoggerTest : 1:java.lang.NullPointerException"));
         } finally {
