From a8aec7e925f53a1dfbb38530aa47d70313a22098 Mon Sep 17 00:00:00 2001 From: Rachitha Date: Mon, 4 Nov 2019 13:08:32 +0530 Subject: Using logger to throw exception Issue-ID: AAF-1032 Change-Id: Ic7a6f89de457bca7c3bdc4ea5a3e58cfe214e06c Signed-off-by: Rachitha --- auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java index b5ff59b1..d2695a35 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java @@ -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); } } -- cgit 1.2.3-korg