X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdatarouter.git;a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Fbeans%2FParameters.java;h=9e7071bb6ac9a85bfebaebe93c85bb83ae4b9d64;hp=08914868b85b499c1e9bcd947b517538acb2dbc6;hb=534c164c124950a2019acf71d253ac96be12c78c;hpb=b60213dc26540543f500b3442b061565907c3cf8 diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Parameters.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Parameters.java index 08914868..9e7071bb 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Parameters.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/Parameters.java @@ -57,6 +57,7 @@ public class Parameters extends Syncable { public static final String PROV_POKETIMER2 = "PROV_POKETIMER2"; public static final String PROV_SPECIAL_SUBNET = "PROV_SPECIAL_SUBNET"; public static final String PROV_LOG_RETENTION = "PROV_LOG_RETENTION"; + public static final String DEFAULT_LOG_RETENTION = "DEFAULT_LOG_RETENTION"; public static final String NODES = "NODES"; public static final String ACTIVE_POD = "ACTIVE_POD"; public static final String STANDBY_POD = "STANDBY_POD"; @@ -69,6 +70,7 @@ public class Parameters extends Syncable { public static final String STATIC_ROUTING_NODES = "STATIC_ROUTING_NODES"; //Adding new param for static Routing - Rally:US664862-1610 private static EELFLogger intlogger = EELFManager.getInstance().getLogger("InternalLog"); + private static final String SQLEXCEPTION = "SQLException: "; private String keyname; private String value; @@ -103,7 +105,7 @@ public class Parameters extends Syncable { } db.release(conn); } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage()); } return coll; } @@ -131,7 +133,7 @@ public class Parameters extends Syncable { } db.release(conn); } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage()); } return v; } @@ -154,10 +156,6 @@ public class Parameters extends Syncable { return keyname; } - public void setKeyname(String keyname) { - this.keyname = keyname; - } - public String getValue() { return value; } @@ -187,14 +185,14 @@ public class Parameters extends Syncable { ps.execute(); } catch (SQLException e) { rv = false; - intlogger.warn("PROV0005 doInsert: " + e.getMessage()); + intlogger.warn("PROV0005 doInsert: " + e.getMessage(), e); } finally { try { if (ps != null) { ps.close(); } } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage()); } } return rv; @@ -213,14 +211,14 @@ public class Parameters extends Syncable { ps.executeUpdate(); } catch (SQLException e) { rv = false; - intlogger.warn("PROV0006 doUpdate: " + e.getMessage()); + intlogger.warn("PROV0006 doUpdate: " + e.getMessage(),e); } finally { try { if (ps != null) { ps.close(); } } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage(), e); } } return rv; @@ -238,14 +236,14 @@ public class Parameters extends Syncable { ps.execute(); } catch (SQLException e) { rv = false; - intlogger.warn("PROV0007 doDelete: " + e.getMessage()); + intlogger.warn("PROV0007 doDelete: " + e.getMessage(), e); } finally { try { if (ps != null) { ps.close(); } } catch (SQLException e) { - intlogger.error("SQLException " + e.getMessage()); + intlogger.error(SQLEXCEPTION + e.getMessage(), e); } } return rv;