From 78c71089c3134a32dd7c7fb18f1c1a83f2dcab09 Mon Sep 17 00:00:00 2001 From: burdziak Date: Thu, 25 Jan 2018 10:20:07 +0100 Subject: Fix in DBUtils Changed to EELF Change-Id: I6e78aaa9c350e89b68fed597313580dd3b167a61 Issue-ID: APPC-503 Signed-off-by: burdziak --- .../src/main/java/org/onap/appc/dao/util/DBUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'appc-dispatcher/appc-dispatcher-common/appc-data-access-lib') diff --git a/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/DBUtils.java b/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/DBUtils.java index 95942a3b5..f3fb9a954 100644 --- a/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/DBUtils.java +++ b/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/onap/appc/dao/util/DBUtils.java @@ -24,6 +24,8 @@ package org.onap.appc.dao.util; +import com.att.eelf.configuration.EELFLogger; +import com.att.eelf.configuration.EELFManager; import org.onap.appc.configuration.Configuration; import org.onap.appc.configuration.ConfigurationFactory; import java.sql.*; @@ -43,6 +45,7 @@ import java.sql.*; */ @Deprecated public class DBUtils { + private static final EELFLogger logger = EELFManager.getInstance().getLogger(DBUtils.class); private static final String JDBC_DRIVER = "org.mariadb.jdbc.Driver"; private static final Configuration configuration = ConfigurationFactory.getConfiguration(); @@ -51,7 +54,7 @@ public class DBUtils { String driver = JDBC_DRIVER; Class.forName(driver); } catch (ClassNotFoundException e) { - e.printStackTrace(); + logger.error(e.getMessage()); } } @@ -74,7 +77,7 @@ public class DBUtils { connection.close(); clearFlag = true; } catch (SQLException e) { - + logger.error(e.getMessage()); } return clearFlag; -- cgit 1.2.3-korg