local properties override for ./config/kustvakt.conf, ./config/jdbc.properties, ./config/log4j.properties
diff --git a/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java b/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java
index 90f3c23..1a5c7a9 100644
--- a/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java
+++ b/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java
@@ -18,28 +18,27 @@
//fixme:
public static final KustvaktLogger ERROR_LOGGER = KustvaktLogger
- .initiate(ERROR_LOG);
+ .getLogger(ERROR_LOG);
public static final KustvaktLogger QUERY_LOGGER = KustvaktLogger
- .initiate("ql");
+ .getLogger("ql");
@Deprecated
public static final KustvaktLogger SECURITY_LOGGER = KustvaktLogger
- .initiate("security");
+ .getLogger("security");
private Logger log;
- public static KustvaktLogger initiate(Class cl) {
- KustvaktLogger l = new KustvaktLogger();
- l.log = LoggerFactory.getLogger(cl);
+ public static KustvaktLogger getLogger(Class cl) {
+ KustvaktLogger l = new KustvaktLogger(LoggerFactory.getLogger(cl));
return l;
}
- public static KustvaktLogger initiate(String name) {
- KustvaktLogger l = new KustvaktLogger();
- l.log = LoggerFactory.getLogger(name);
+ public static KustvaktLogger getLogger(String name) {
+ KustvaktLogger l = new KustvaktLogger(LoggerFactory.getLogger(name));
return l;
}
- private KustvaktLogger() {
+ private KustvaktLogger(Logger log) {
+ this.log = log;
}
@Override
@@ -86,7 +85,7 @@
@Override
public boolean isTraceEnabled(Marker marker) {
if (DEBUG)
- return true;
+ return this.log.isTraceEnabled();
return false;
}