qserv logging

This commit is contained in:
Peter Hormanns 2017-09-19 20:23:23 +02:00
parent ced5cc9827
commit b05e5555f2
2 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,7 @@ 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;
@ -13,6 +14,8 @@ 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;
final private String user;
@ -28,6 +31,7 @@ public class JDBCProcessor extends AbstractProcessor {
this.password = password;
this.errorMsg = "";
this.sql = new ArrayList<String>();
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<String>();
}

View File

@ -3,11 +3,14 @@ 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;
private Config() {
@ -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