Merge "Using logger to throw exception Issue-ID: AAF-1032 Change-Id: Ic7a6f89de457bca...
authorJonathan Gathman <jonathan.gathman@att.com>
Wed, 6 Nov 2019 12:54:38 +0000 (12:54 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 6 Nov 2019 12:54:38 +0000 (12:54 +0000)
auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java

index b5ff59b..d2695a3 100644 (file)
@@ -264,8 +264,7 @@ public abstract class Batch {
         try {
             hostname = InetAddress.getLocalHost().getHostName();
         } catch (UnknownHostException e) {
-            e.printStackTrace();
-            env.warn().log("Unable to get hostname");
+            env.warn().log("Unable to get hostname : "+e.getMessage());
             return (0);
         }
 
@@ -545,7 +544,7 @@ public abstract class Batch {
             if(cluster!=null && !cluster.isClosed()) {
                 cluster.close();
             }
-            e.printStackTrace(System.err);
+            env.warn().log(System.err);
         }
     }