X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Fatt%2Fnsa%2FdmaapMMAgent%2FMirrorMakerAgent.java;h=e2bdeafd7f0aae0ee45170a43cec67ecbedbe83d;hb=refs%2Fchanges%2F19%2F30419%2F1;hp=070281c54b821d4885d75fe8e5190f89e322a5be;hpb=cc4d512cc63a3014e340e8b641b9f0eaecc62831;p=dmaap%2Fmessagerouter%2Fmirroragent.git diff --git a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java index 070281c..e2bdeaf 100644 --- a/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java +++ b/src/main/java/com/att/nsa/dmaapMMAgent/MirrorMakerAgent.java @@ -103,7 +103,6 @@ public class MirrorMakerAgent { input.close(); } catch (IOException e) { logger.error("IOException" + e); - e.printStackTrace(); } } } @@ -116,14 +115,14 @@ public class MirrorMakerAgent { } logger.info("kakahome is set :" + kafkahome); } catch (IOException ex) { - logger.error(kafkahome + "/bin/kafka-run-class.sh not found. Make sure kafka home is set correctly"); + logger.error(kafkahome + "/bin/kafka-run-class.sh not found. Make sure kafka home is set correctly" + ex); return false; } finally { if (input != null) { try { input.close(); } catch (IOException e) { - e.printStackTrace(); + logger.error("IOException" + e); } } } @@ -167,14 +166,14 @@ public class MirrorMakerAgent { prop.store(out, ""); } catch (Exception e) { - e.printStackTrace(); + logger.error("Exception at checkPropertiesFile " +e); } } finally { if (input != null) { try { input.close(); } catch (IOException e) { - e.printStackTrace(); + logger.error("Exception occurred is " +e); } } if (out != null) { @@ -182,6 +181,7 @@ public class MirrorMakerAgent { out.close(); } catch (IOException e) { e.printStackTrace(); + logger.error("Exception is : "+e); } } } @@ -361,7 +361,7 @@ public class MirrorMakerAgent { } } catch (Exception e) { - e.printStackTrace(); + logger.error("Exception at readAgentTopic : " + e); } } @@ -385,7 +385,7 @@ public class MirrorMakerAgent { } else if (exists == false && mirrorMakers == null) { mirrorMakers = new ListMirrorMaker(); ArrayList list = mirrorMakers.getListMirrorMaker(); - list = new ArrayList(); + list = new ArrayList(); list.add(newMirrorMaker); mirrorMakers.setListMirrorMaker(list); }