aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChandan Ghosh <cghosh12@in.ibm.com>2018-09-05 12:00:18 +0530
committerChandan Ghosh <cghosh12@in.ibm.com>2018-09-05 12:00:25 +0530
commitb10344bac3bd0c7423f0558936dccf37872b9d44 (patch)
treea23807e14f596b4661a56b72adf1617b9a900e9c /src/main
parent36e2dab449eae8ede28200f95bfaec2ab23bd486 (diff)
replaced stacktrace with error log
Replaced stacktrace with error log. Reported in SonarQube. Issue-ID: MUSIC-129 Change-Id: I54626e3b8d80cf7242cd1e67b627aa73266f1e8d Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/music/main/CronJobManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/onap/music/main/CronJobManager.java b/src/main/java/org/onap/music/main/CronJobManager.java
index 0344c4a1..4928044e 100644
--- a/src/main/java/org/onap/music/main/CronJobManager.java
+++ b/src/main/java/org/onap/music/main/CronJobManager.java
@@ -33,6 +33,9 @@ import javax.servlet.annotation.WebListener;
import org.onap.music.datastore.PreparedQueryObject;
import org.onap.music.eelf.logging.EELFLoggerDelegate;
+import org.onap.music.eelf.logging.format.AppMessages;
+import org.onap.music.eelf.logging.format.ErrorSeverity;
+import org.onap.music.eelf.logging.format.ErrorTypes;
import org.onap.music.exceptions.MusicLockingException;
import org.onap.music.exceptions.MusicServiceException;
@@ -55,7 +58,7 @@ public class CronJobManager implements ServletContextListener {
try {
ResultType result = MusicCore.nonKeyRelatedPut(pQuery, consistency);
} catch (MusicServiceException e1) {
- e1.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(),ErrorSeverity.ERROR);
}
//Zookeeper cleanup
@@ -102,7 +105,7 @@ public class CronJobManager implements ServletContextListener {
CachingUtil.deleteKeysFromDB(deleteKeys.toString());
}
} catch (MusicServiceException e) {
- e.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),ErrorSeverity.ERROR);
}
}