Removed explicit references to exceptions in log messages 58/106058/3
authorChris André <chris.andre@yoppworks.com>
Wed, 15 Apr 2020 17:37:46 +0000 (13:37 -0400)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Sun, 19 Apr 2020 06:45:30 +0000 (06:45 +0000)
Issue-ID: SDC-2884
Change-Id: I6f3e9503922cc3a4f4049fced8d23cede7b0455a
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
asdctool/src/main/java/org/openecomp/sdc/asdctool/impl/validator/config/ValidationConfigManager.java
catalog-fe/src/main/java/org/openecomp/sdc/fe/servlets/SSLProxyServlet.java
common-app-api/src/main/java/org/openecomp/sdc/common/config/generation/GenerateEcompErrorsCsv.java
common-app-api/src/main/java/org/openecomp/sdc/common/monitoring/MonitoringMetricsFetcher.java

index cdb3b2c..6db0a56 100644 (file)
@@ -76,8 +76,7 @@ public class ValidationConfigManager {
             input = new FileInputStream(path);
             prop.load(input);
         } catch (IOException ex) {
-            ex.printStackTrace();
-            log.info("FileInputStream failed - {}", ex);
+            log.info("FileInputStream failed", ex);
         }
         return prop;
     }
index d4f6832..5f5bcd6 100644 (file)
@@ -65,7 +65,7 @@ public abstract class SSLProxyServlet extends ProxyServlet {
         try {
             httpClient.start();
         } catch (Exception x) {
-            log.error("Exception thrown while starting httpClient {}", x);
+            log.error("Exception thrown while starting httpClient", x);
             throw new ServletException(x);
         }
 
index f59385e..a4852d1 100644 (file)
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -166,7 +166,7 @@ public class GenerateEcompErrorsCsv {
                                ecompErrorRow.setCleanErrorCode(cleanErrorCode);
                                ecompErrorRow.setDescription(ecompErrorEnum.getEcompErrorCode().getDescription());
                                ecompErrorRow.setErrorCode(errorCode);
-                               ecompErrorRow.setErrorName(ecompErrorEnum.name().toString());
+                               ecompErrorRow.setErrorName(ecompErrorEnum.name());
                                ecompErrorRow.setErrorType(ecompErrorEnum.geteType());
                                ecompErrorRow.setResolution(ecompErrorEnum.getEcompErrorCode().getResolution());
 
@@ -195,7 +195,7 @@ public class GenerateEcompErrorsCsv {
                        result = true;
 
                } catch (Exception e) {
-                       log.info("generate Ecomp Errors Csv File failed - {}" , e);
+                       log.info("generate Ecomp Errors Csv File failed" , e);
                }
 
                return result;
index ea92156..a7230c5 100644 (file)
@@ -137,7 +137,7 @@ public class MonitoringMetricsFetcher {
                        cpuTime = (long) platformMBeanServer.getAttribute(
                                        new ObjectName(ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME), PROCESS_CPU_TIME_ATTR);
                } catch (Exception e) {
-                       monitoringLogger.error("Couldn't measure JVM CPU time, error: {}", e);
+                       monitoringLogger.error("Couldn't measure JVM CPU time", e);
                }
                return cpuTime;
        }
@@ -152,7 +152,7 @@ public class MonitoringMetricsFetcher {
                try {
                        cpuTime = sigarSession.getCpu().getTotal();
                } catch (Exception e) {
-                       monitoringLogger.error("Couldn't measure host CPU time, error: {}", e);
+                       monitoringLogger.error("Couldn't measure host CPU time", e);
                }
                return cpuTime;
        }
@@ -167,7 +167,7 @@ public class MonitoringMetricsFetcher {
                try {
                        memory = sigarSession.getMem().getUsedPercent();
                } catch (Exception e) {
-                       monitoringLogger.error("Couldn't measure host used memory, error: {}", e);
+                       monitoringLogger.error("Couldn't measure host used memory", e);
                }
                return memory;
        }
@@ -188,7 +188,7 @@ public class MonitoringMetricsFetcher {
                                res.put(dirName, usePercent);
                        }
                } catch (Exception e) {
-                       monitoringLogger.error("Couldn't measure host used disk, error: {}", e);
+                       monitoringLogger.error("Couldn't measure host used disk", e);
                }
                return res;
        }
@@ -203,7 +203,7 @@ public class MonitoringMetricsFetcher {
                try {
                        fqdn = sigarSession.getFQDN();
                } catch (Exception e) {
-                       monitoringLogger.error("Couldn't get FQDN, error: {}", e);
+                       monitoringLogger.error("Couldn't get FQDN", e);
                }
                return fqdn;
        }