From b05e5555f229781a649d42861e530e33768809cb Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Tue, 19 Sep 2017 20:23:23 +0200 Subject: [PATCH] qserv logging --- hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java | 5 +++++ hsarback/src/de/hsadmin/core/util/Config.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java b/hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java index 0842bce..3a7da87 100644 --- a/hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java +++ b/hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java @@ -6,12 +6,15 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; +import java.util.logging.Logger; import de.hsadmin.core.util.Config; public class JDBCProcessor extends AbstractProcessor { private static final long serialVersionUID = 1L; + + private static final Logger LOG = Logger.getLogger(JDBCProcessor.class.getName()); final private String driver; final private String url; @@ -28,6 +31,7 @@ public class JDBCProcessor extends AbstractProcessor { this.password = password; this.errorMsg = ""; this.sql = new ArrayList(); + LOG.info("Constructor 1 - DB-User: " + user + " Password: " + password); } public JDBCProcessor(final String driver, final String url) throws ProcessorException { @@ -45,6 +49,7 @@ public class JDBCProcessor extends AbstractProcessor { throw new ProcessorException("database admin-user configuration failed"); } } + LOG.info("Constructor 2 - DB-User: " + user + " Password: " + password); this.errorMsg = ""; this.sql = new ArrayList(); } diff --git a/hsarback/src/de/hsadmin/core/util/Config.java b/hsarback/src/de/hsadmin/core/util/Config.java index cbc3e75..2d713a4 100644 --- a/hsarback/src/de/hsadmin/core/util/Config.java +++ b/hsarback/src/de/hsadmin/core/util/Config.java @@ -3,10 +3,13 @@ package de.hsadmin.core.util; import java.io.File; import java.io.FileReader; import java.util.Properties; +import java.util.logging.Logger; public class Config { private static Config instance; + + private static Logger LOG = Logger.getLogger(Config.class.getName()); private Properties props; @@ -27,6 +30,7 @@ public class Config { } if (file.canRead()) { try { + LOG.info("Constructor - Properties-File: " + file.getAbsolutePath()); props.load(new FileReader(file)); } catch (Exception e) { // should not happen