X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-node%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fnode%2FStatusLog.java;h=1be3408a0947eea7ae4734aa8374843f8000d1b3;hp=43c4fda4ee873c3744b1622e5a16efc9034192b6;hb=5e6a9f65049e8e8d39e8dcab227e5d75b328b173;hpb=8cbe8a88bc6dfe8673a33a017fe6a5a3e7ce86c3 diff --git a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java index 43c4fda4..1be3408a 100644 --- a/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java +++ b/datarouter-node/src/main/java/org/onap/dmaap/datarouter/node/StatusLog.java @@ -23,6 +23,8 @@ package org.onap.dmaap.datarouter.node; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; import java.util.regex.*; import java.util.*; import java.io.*; @@ -33,6 +35,7 @@ import java.text.*; * Logging for data router delivery events (PUB/DEL/EXP) */ public class StatusLog { + private static EELFLogger eelfLogger = EELFManager.getInstance().getLogger(StatusLog.class); private static StatusLog instance = new StatusLog(); private HashSet toship = new HashSet(); private SimpleDateFormat filedate; @@ -49,11 +52,12 @@ public class StatusLog { try { filedate = new SimpleDateFormat("-yyyyMMddHHmm"); } catch (Exception e) { + eelfLogger.error("Exception", e); } } /** - * Parse an interval of the form xxhyymzzs and round it to the nearest whole fraction of 24 hours. If no units are specified, assume seconds. + * Parse an interval of the form xxhyymzzs and round it to the nearest whole fraction of 24 hours.If no units are specified, assume seconds. */ public static long parseInterval(String interval, int def) { try { @@ -104,6 +108,7 @@ public class StatusLog { def = best * 1000; } } catch (Exception e) { + eelfLogger.error("Exception", e); } return (def); } @@ -133,6 +138,7 @@ public class StatusLog { try { instance.checkRoll(System.currentTimeMillis()); } catch (Exception e) { + eelfLogger.error("Exception", e); } return (instance.curfile); } @@ -149,6 +155,7 @@ public class StatusLog { os.write((NodeUtils.logts(new Date(now)) + '|' + s + '\n').getBytes()); os.flush(); } catch (IOException ioe) { + eelfLogger.error("IOException", ioe); } }