Merge "Sonar Fixes - CadiAuthFilter.java"
[music.git] / src / main / java / org / onap / music / eelf / healthcheck / MusicHealthCheck.java
index 7cff9d3..1f9fe5b 100644 (file)
@@ -3,6 +3,8 @@
  * org.onap.music
  * ===================================================================
  *  Copyright (c) 2017 AT&T Intellectual Property
+ *  
+ *  Modifications Copyright (C) 2019 IBM.
  * ===================================================================
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -65,9 +67,7 @@ public class MusicHealthCheck {
                     try {
                         result = getAdminKeySpace(consistency);
                     } catch (MusicServiceException e1) {
-                        // TODO Auto-generated catch block
-                        logger.error("Error", e);
-                        e1.printStackTrace();
+                      logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(),AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN);
                     }
             } else {
                 logger.error("Error", e);
@@ -98,9 +98,7 @@ public class MusicHealthCheck {
         try {
             rs = MusicCore.nonKeyRelatedPut(pQuery, ConsistencyLevel.ONE.toString());
         } catch (MusicServiceException e) {
-            // TODO Auto-generated catch block
-            e.printStackTrace();
-            logger.error("Error", e);
+            logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN);
         }
         return rs != null && rs.getResult().toLowerCase().contains("success");
     }