summaryrefslogtreecommitdiffstats
path: root/common-logging/src/main
diff options
context:
space:
mode:
authorMagnusen, Drew (dm741q) <dm741q@att.com>2017-07-31 12:51:51 -0500
committerMagnusen, Drew (dm741q) <dm741q@att.com>2017-08-01 08:36:08 -0500
commit9c1eba1933eb84398b1cfa88199953fea935d691 (patch)
tree0ace9a620cb3f668e122d2e395c72a699f2d36bc /common-logging/src/main
parent3934bfec62ea0ed3e91ac819225c417e217008a8 (diff)
[POLICY-134] Fixed bug in PolicyLogger.
PolicyLogger.info(Object arg0) calls itself recursively until it eventually causes a stack overflow error. Fix is to call debugLogger.info(MessageCodes, String) from within PolicyLogger.info(Object). Additionally, PolicyLogger.info(String arg0) was removed as debugLogger.info(MessageCodes, String) can be called directly. Change-Id: Id141027b544efa06b79f54a6726843b2a47481b9 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
Diffstat (limited to 'common-logging/src/main')
-rw-r--r--common-logging/src/main/java/org/onap/policy/common/logging/eelf/PolicyLogger.java10
1 files changed, 1 insertions, 9 deletions
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 d0cc9c1e..7507c9ea 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
@@ -366,14 +366,6 @@ public class PolicyLogger {
debugLogger.info(MessageCodes.GENERAL_INFO, arg0);
}
- /**
- * Records only one String message without its class name passed in
- * @param arg0
- */
- public static void info(String arg0) {
- MDC.put(CLASS_NAME, "");
- debugLogger.info(MessageCodes.GENERAL_INFO, arg0);
- }
/**
* Records only one String message
@@ -381,7 +373,7 @@ public class PolicyLogger {
*/
public static void info(Object arg0) {
MDC.put(CLASS_NAME, "");
- info(arg0);
+ debugLogger.info(MessageCodes.GENERAL_INFO, String.valueOf(arg0));
}
/**