summaryrefslogtreecommitdiffstats
path: root/auth/auth-batch/src/main/java/org/onap
diff options
context:
space:
mode:
authorRachitha <racrama1@in.ibm.com>2019-11-04 13:08:32 +0530
committerRachitha <racrama1@in.ibm.com>2019-11-04 13:18:15 +0530
commita8aec7e925f53a1dfbb38530aa47d70313a22098 (patch)
tree4135ab957026c876cf3eadc7610c9ba54bd6fc40 /auth/auth-batch/src/main/java/org/onap
parent31dd5bea893f6c5558d58caa515551743e416273 (diff)
Using logger to throw exception
Issue-ID: AAF-1032 Change-Id: Ic7a6f89de457bca7c3bdc4ea5a3e58cfe214e06c Signed-off-by: Rachitha <racrama1@in.ibm.com>
Diffstat (limited to 'auth/auth-batch/src/main/java/org/onap')
-rw-r--r--auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/Batch.java5
1 files 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);
}
}