HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-09-19 b05e5555f229781a649d42861e530e33768809cb
qserv logging
2 files modified
9 ■■■■■ changed files
hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java 5 ●●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/core/util/Config.java 4 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/core/qserv/JDBCProcessor.java
@@ -6,12 +6,15 @@
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 @@
        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 @@
                throw new ProcessorException("database admin-user configuration failed");
            }
        }
        LOG.info("Constructor 2 - DB-User: " + user + "  Password: " + password);
        this.errorMsg = "";
        this.sql = new ArrayList<String>();
    }
hsarback/src/de/hsadmin/core/util/Config.java
@@ -3,10 +3,13 @@
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 @@
        }
        if (file.canRead()) {
            try {
                LOG.info("Constructor - Properties-File: " + file.getAbsolutePath());
                props.load(new FileReader(file));
            } catch (Exception e) {
                // should not happen