Migrated logging to log4j2 and adapted java.util.logging to log4j.

Change-Id: I587a8f0252714e17ec70e0f9eb5db63aca292b5f
diff --git a/core/pom.xml b/core/pom.xml
index 45780a9..3e09cee 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -80,13 +80,13 @@
 				rest tests -->
 			<!-- <plugin>
 				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-jar-plugin</artifactId>
-				<version>3.0.2</version>
+				<artifactId>maven-source-plugin</artifactId>
+				<version>3.0.1</version>
 				<executions>
 					<execution>
-						<phase>package</phase>
+						<id>attach-sources</id>
 						<goals>
-							<goal>test-jar</goal>
+							<goal>jar</goal>
 						</goals>
 					</execution>
 				</executions>
@@ -183,12 +183,29 @@
 			<version>${jersey.version}</version>
 			<scope>test</scope>
 		</dependency>
+		<!-- EM: Logging -->
 		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-log4j12</artifactId>
-			<version>1.7.25</version>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-api</artifactId>
+			<version>2.11.0</version>
 		</dependency>
 		<dependency>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-core</artifactId>
+			<version>2.11.0</version>
+		</dependency>
+		<dependency>
+		    <groupId>org.apache.logging.log4j</groupId>
+		    <artifactId>log4j-slf4j-impl</artifactId>
+		    <version>2.11.0</version>
+		</dependency>
+		<dependency>
+		    <groupId>org.apache.logging.log4j</groupId>
+		    <artifactId>log4j-jul</artifactId>
+		    <version>2.11.0</version>
+		</dependency>
+		
+		<dependency>
 			<groupId>junit</groupId>
 			<artifactId>junit</artifactId>
 			<version>4.12</version>
@@ -212,14 +229,22 @@
 					<groupId>org.eclipse.jetty</groupId>
 					<artifactId>jetty-servlet</artifactId>
 				</exclusion>
-				<exclusion> 
-			        <groupId>org.slf4j</groupId>
-			        <artifactId>slf4j-log4j12</artifactId>
-			    </exclusion>
-			    <exclusion> 
-			        <groupId>log4j</groupId>
-			        <artifactId>log4j</artifactId>
-			    </exclusion>
+				<exclusion>
+					<groupId>org.slf4j</groupId>
+					<artifactId>slf4j-api</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.slf4j</groupId>
+					<artifactId>slf4j-log4j12</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>log4j</groupId>
+					<artifactId>log4j</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>log4j</groupId>
+					<artifactId>apache-log4j-extras</artifactId>
+				</exclusion>
 			</exclusions>
 		</dependency>
 
@@ -229,8 +254,6 @@
 			<version>3.21.0</version>
 		</dependency>
 
-		
-
 		<dependency>
 			<groupId>org.apache.commons</groupId>
 			<artifactId>commons-dbcp2</artifactId>
@@ -248,7 +271,7 @@
 			<artifactId>jbcrypt</artifactId>
 			<version>0.4</version>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>de.ids_mannheim.korap</groupId>
 			<artifactId>Krill</artifactId>
@@ -258,14 +281,18 @@
 					<groupId>org.xerial</groupId>
 					<artifactId>sqlite-jdbc</artifactId>
 				</exclusion>
-				<exclusion> 
-			        <groupId>org.slf4j</groupId>
-			        <artifactId>slf4j-log4j12</artifactId>
-			    </exclusion>
-			    <exclusion> 
-			        <groupId>org.apache.logging.log4j</groupId>
-			        <artifactId>log4j-slf4j-impl</artifactId>
-			    </exclusion>
+				<exclusion>
+					<groupId>org.slf4j</groupId>
+					<artifactId>slf4j-log4j12</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-slf4j-impl</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.slf4j</groupId>
+					<artifactId>jul-to-slf4j</artifactId>
+				</exclusion>
 			</exclusions>
 		</dependency>
 		<dependency>
@@ -334,7 +361,7 @@
 			<artifactId>commons-collections</artifactId>
 			<version>3.2.2</version>
 		</dependency>
-		
+
 		<!-- jetty -->
 		<dependency>
 			<groupId>org.eclipse.jetty</groupId>
@@ -351,7 +378,7 @@
 			<artifactId>jetty-webapp</artifactId>
 			<version>${jetty.version}</version>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>asm</groupId>
 			<artifactId>asm</artifactId>
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/ConfigLoader.java b/core/src/main/java/de/ids_mannheim/korap/config/ConfigLoader.java
index 855417c..9fcc3bd 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/ConfigLoader.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/ConfigLoader.java
@@ -1,20 +1,20 @@
 package de.ids_mannheim.korap.config;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
 /**
  * Created by hanl on 08.06.16.
  */
 public class ConfigLoader {
 
-    private static final Logger jlog = LoggerFactory.getLogger(ConfigLoader.class);
+    private static final Logger jlog = LogManager.getLogger(ConfigLoader.class);
 
 
     private ConfigLoader () {}
diff --git a/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java b/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
index c3e45c2..b4c1bdd 100644
--- a/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
+++ b/core/src/main/java/de/ids_mannheim/korap/config/KustvaktConfiguration.java
@@ -4,18 +4,16 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.log4j.PropertyConfigurator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+//import org.apache.logging.log4j.PropertyConfigurator;
 
-import de.ids_mannheim.korap.exceptions.KustvaktException;
 import de.ids_mannheim.korap.utils.TimeUtils;
 import lombok.Getter;
 
@@ -33,7 +31,7 @@
     public static final Map<String, Object> KUSTVAKT_USER = new HashMap<>();
 
     private static final Logger jlog =
-            LoggerFactory.getLogger(KustvaktConfiguration.class);
+            LogManager.getLogger(KustvaktConfiguration.class);
     private String indexDir;
     private int port;
     // todo: make exclusive so that the containg languages can really
@@ -198,54 +196,54 @@
 
 
     public static void loadLogger () {
-        InputStream stream = ConfigLoader.loadConfigStream("log4j.properties");
-        PropertyConfigurator.configure(stream);
+//        InputStream stream = ConfigLoader.loadConfigStream("log4j.properties");
+//        PropertyConfigurator.configure(stream);
         jlog.info("Done loading logging framework Log4j!");
     }
 
 
 
-    @Deprecated
-    public static void loadLog4jLogger () {
-        /** loadSubTypes log4j configuration file programmatically */
-        Properties log4j = new Properties();
-        try {
-            File f = new File(System.getProperty("user.dir"),
-                    "log4j.properties");
-            if (f.exists()) {
-                log4j.load(new FileInputStream(f));
-                PropertyConfigurator.configure(log4j);
-                jlog.info(
-                        "using local logging properties file ({}) to configure logging system",
-                        "./log4j.properties");
-                return;
-            }
-        }
-        catch (Exception e) {
-            // do nothing
-        }
-        loadClassLogger();
-    }
+//    @Deprecated
+//    public static void loadLog4jLogger () {
+//        /** loadSubTypes log4j configuration file programmatically */
+//        Properties log4j = new Properties();
+//        try {
+//            File f = new File(System.getProperty("user.dir"),
+//                    "log4j.properties");
+//            if (f.exists()) {
+//                log4j.load(new FileInputStream(f));
+//                PropertyConfigurator.configure(log4j);
+//                jlog.info(
+//                        "using local logging properties file ({}) to configure logging system",
+//                        "./log4j.properties");
+//                return;
+//            }
+//        }
+//        catch (Exception e) {
+//            // do nothing
+//        }
+//        loadClassLogger();
+//    }
 
 
-    @Deprecated
-    private static void loadClassLogger () {
-        Properties log4j = new Properties();
-        jlog.info(
-                "using class path logging properties file to configure logging system");
-
-        try {
-            log4j.load(KustvaktConfiguration.class.getClassLoader()
-                    .getResourceAsStream("log4j.properties"));
-        }
-        catch (IOException e) {
-            // do nothing
-        }
-
-        PropertyConfigurator.configure(log4j);
-        jlog.warn(
-                "No logger properties detected. Using default logger properties");
-    }
+//    @Deprecated
+//    private static void loadClassLogger () {
+//        Properties log4j = new Properties();
+//        jlog.info(
+//                "using class path logging properties file to configure logging system");
+//
+//        try {
+//            log4j.load(KustvaktConfiguration.class.getClassLoader()
+//                    .getResourceAsStream("log4j.properties"));
+//        }
+//        catch (IOException e) {
+//            // do nothing
+//        }
+//
+//        PropertyConfigurator.configure(log4j);
+//        jlog.warn(
+//                "No logger properties detected. Using default logger properties");
+//    }
 
     public enum BACKENDS {
         NEO4J, LUCENE
diff --git a/core/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java b/core/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java
index 9e615f3..99ddebe 100644
--- a/core/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java
+++ b/core/src/main/java/de/ids_mannheim/korap/exceptions/ServiceException.java
@@ -4,13 +4,14 @@
 import lombok.AccessLevel;
 import lombok.Getter;
 import lombok.Setter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
 /**
  * @author hanl
  * @date 08/04/2015
@@ -22,7 +23,7 @@
 public class ServiceException extends Exception {
 
     protected List<AuditRecord> records = new ArrayList<>();
-    private static final Logger jlog = LoggerFactory
+    private static final Logger jlog = LogManager
             .getLogger(ServiceException.class);
 
     private int status;
diff --git a/core/src/main/java/de/ids_mannheim/korap/interfaces/defaults/ApacheValidator.java b/core/src/main/java/de/ids_mannheim/korap/interfaces/defaults/ApacheValidator.java
index 1b9477a..e78cd0c 100644
--- a/core/src/main/java/de/ids_mannheim/korap/interfaces/defaults/ApacheValidator.java
+++ b/core/src/main/java/de/ids_mannheim/korap/interfaces/defaults/ApacheValidator.java
@@ -8,8 +8,8 @@
 import de.ids_mannheim.korap.web.utils.KustvaktMap;
 import org.apache.commons.validator.routines.*;
 import org.apache.commons.validator.routines.RegexValidator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.io.IOException;
 import java.util.*;
@@ -19,7 +19,7 @@
  */
 public class ApacheValidator implements ValidatorIface {
 
-    private static Logger jlog = LoggerFactory.getLogger(ApacheValidator.class);
+    private static Logger jlog = LogManager.getLogger(ApacheValidator.class);
 
     private static final String STRING_PATTERN = "^[\\.;:,&\\|@\\[\\]\\=\\*\\/\\/_()\\-0-9\\p{L}\\p{Space}]{0,1024}$";
 
@@ -117,8 +117,8 @@
             else
                 return this.isValid(input, "string");
         }
-        jlog.debug("validating entry '{}' of type '{}': {}", input, type,
-                valid ? "Is valid!" : "Is not valid!");
+        jlog.debug("validating entry "+input+" of type "+type+": "+ (
+                valid ? "Is valid!" : "Is not valid!"));
         return valid;
     }
 }
diff --git a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
index fe98402..592a144 100644
--- a/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
+++ b/core/src/main/java/de/ids_mannheim/korap/resource/rewrite/RewriteHandler.java
@@ -8,8 +8,8 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 
 import com.fasterxml.jackson.databind.JsonNode;
@@ -30,7 +30,7 @@
 public class RewriteHandler{
     //implements BeanInjectable {
 
-    private static Logger jlog = LoggerFactory.getLogger(RewriteHandler.class);
+    private static Logger jlog = LogManager.getLogger(RewriteHandler.class);
     private Collection<RewriteTask.IterableRewritePath> node_processors;
     private Collection<RewriteTask.RewriteKoralToken> token_node_processors;
     private Collection<RewriteTask> query_processors;
@@ -208,7 +208,7 @@
 
 
         private JsonNode start (boolean result) throws KustvaktException {
-            jlog.debug("Running rewrite process on query {}", root);
+            jlog.debug("Running rewrite process on query "+ root);
             if (root != null) {
                 Iterator<Map.Entry<String, JsonNode>> it = root.fields();
                 while (it.hasNext()) {
diff --git a/core/src/main/java/de/ids_mannheim/korap/user/KorAPUser.java b/core/src/main/java/de/ids_mannheim/korap/user/KorAPUser.java
index 9c544f6..d25097f 100644
--- a/core/src/main/java/de/ids_mannheim/korap/user/KorAPUser.java
+++ b/core/src/main/java/de/ids_mannheim/korap/user/KorAPUser.java
@@ -1,14 +1,15 @@
 package de.ids_mannheim.korap.user;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
 import lombok.Getter;
 import lombok.Setter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 @Getter
 @Setter
 public class KorAPUser extends User {
-    private static Logger jlog = LoggerFactory.getLogger(KorAPUser.class);
+    private static Logger jlog = LogManager.getLogger(KorAPUser.class);
     private static final long serialVersionUID = -7108308497625884584L;
 
     //fixme: accountlink to shibboleth account
diff --git a/core/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java b/core/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java
deleted file mode 100644
index e75db81..0000000
--- a/core/src/main/java/de/ids_mannheim/korap/utils/KustvaktLogger.java
+++ /dev/null
@@ -1,431 +0,0 @@
-package de.ids_mannheim.korap.utils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Marker;
-
-/**
- * @author hanl
- * @date 28/03/2014
- */
-
-@Deprecated
-public class KustvaktLogger implements Logger {
-    // debugging flag, info, warn, error will always be logged though!
-    public static boolean DEBUG = false;
-
-    public static final String ERROR_LOG = "errorLog";
-    public static final String SECURITY_LOG = "securityLog";
-
-    public static final KustvaktLogger QUERY_LOGGER = KustvaktLogger
-            .getLogger("ql");
-
-    private Logger log;
-
-
-    public static KustvaktLogger getLogger (Class cl) {
-        return new KustvaktLogger(LoggerFactory.getLogger(cl));
-    }
-
-
-    public static KustvaktLogger getLogger (String name) {
-        return new KustvaktLogger(LoggerFactory.getLogger(name));
-
-    }
-
-
-    private KustvaktLogger (Logger log) {
-        this.log = log;
-    }
-
-
-    @Override
-    public String getName () {
-        return log.getName();
-    }
-
-
-    @Override
-    public boolean isTraceEnabled () {
-        return log.isTraceEnabled();
-    }
-
-
-    @Override
-    public void trace (String s) {
-        if (DEBUG)
-            this.log.trace(s);
-
-    }
-
-
-    @Override
-    public void trace (String s, Object o) {
-        if (DEBUG)
-            this.log.trace(s, o);
-    }
-
-
-    @Override
-    public void trace (String s, Object o, Object o2) {
-        if (DEBUG)
-            this.log.trace(s, o, o2);
-    }
-
-
-    @Override
-    public void trace (String s, Object ... objects) {
-        if (DEBUG)
-            this.log.trace(s, objects);
-    }
-
-
-    @Override
-    public void trace (String s, Throwable throwable) {
-        if (DEBUG)
-            this.log.trace(s, throwable);
-    }
-
-
-    @Override
-    public boolean isTraceEnabled (Marker marker) {
-        if (DEBUG)
-            return this.log.isTraceEnabled();
-        return false;
-    }
-
-
-    @Override
-    public void trace (Marker marker, String s) {
-        if (DEBUG)
-            this.log.trace(marker, s);
-    }
-
-
-    @Override
-    public void trace (Marker marker, String s, Object o) {
-        if (DEBUG)
-            this.log.trace(marker, s, o);
-    }
-
-
-    @Override
-    public void trace (Marker marker, String s, Object o, Object o2) {
-        if (DEBUG)
-            this.log.trace(marker, s, o, o2);
-    }
-
-
-    @Override
-    public void trace (Marker marker, String s, Object ... objects) {
-        if (DEBUG)
-            this.log.trace(marker, s, objects);
-    }
-
-
-    @Override
-    public void trace (Marker marker, String s, Throwable throwable) {
-        if (DEBUG)
-            this.log.trace(marker, s, throwable);
-    }
-
-
-    @Override
-    public boolean isDebugEnabled () {
-        if (DEBUG)
-            return true;
-        return false;
-    }
-
-
-    @Override
-    public void debug (String s) {
-        if (DEBUG)
-            this.log.debug(s);
-    }
-
-
-    @Override
-    public void debug (String s, Object o) {
-        if (DEBUG)
-            this.log.debug(s, o);
-    }
-
-
-    @Override
-    public void debug (String s, Object o, Object o2) {
-        if (DEBUG)
-            this.log.debug(s, o, o2);
-    }
-
-
-    @Override
-    public void debug (String s, Object ... objects) {
-        if (DEBUG)
-            this.log.debug(s);
-    }
-
-
-    @Override
-    public void debug (String s, Throwable throwable) {
-        if (DEBUG)
-            this.log.debug(s, throwable);
-    }
-
-
-    @Override
-    public boolean isDebugEnabled (Marker marker) {
-        return this.log.isDebugEnabled(marker);
-    }
-
-
-    @Override
-    public void debug (Marker marker, String s) {
-        if (DEBUG)
-            this.log.debug(marker, s);
-    }
-
-
-    @Override
-    public void debug (Marker marker, String s, Object o) {
-        if (DEBUG)
-            this.log.debug(marker, s, o);
-    }
-
-
-    @Override
-    public void debug (Marker marker, String s, Object o, Object o2) {
-        if (DEBUG)
-            this.log.debug(marker, s, o, o2);
-    }
-
-
-    @Override
-    public void debug (Marker marker, String s, Object ... objects) {
-        if (DEBUG)
-            this.log.debug(marker, s, objects);
-    }
-
-
-    @Override
-    public void debug (Marker marker, String s, Throwable throwable) {
-        if (DEBUG)
-            this.log.debug(marker, s, throwable);
-    }
-
-
-    @Override
-    public boolean isInfoEnabled () {
-        return this.log.isInfoEnabled();
-    }
-
-
-    @Override
-    public void info (String s) {
-        this.log.info(s);
-    }
-
-
-    @Override
-    public void info (String s, Object o) {
-        this.log.info(s, o);
-    }
-
-
-    @Override
-    public void info (String s, Object o, Object o2) {
-        this.log.info(s, o, o2);
-    }
-
-
-    @Override
-    public void info (String s, Object ... objects) {
-        this.log.info(s, objects);
-    }
-
-
-    @Override
-    public void info (String s, Throwable throwable) {
-        this.log.info(s, throwable);
-    }
-
-
-    @Override
-    public boolean isInfoEnabled (Marker marker) {
-        return this.log.isInfoEnabled(marker);
-    }
-
-
-    @Override
-    public void info (Marker marker, String s) {
-        this.log.info(marker, s);
-    }
-
-
-    @Override
-    public void info (Marker marker, String s, Object o) {
-        this.log.info(marker, s, o);
-    }
-
-
-    @Override
-    public void info (Marker marker, String s, Object o, Object o2) {
-        this.log.info(marker, s, o, o2);
-    }
-
-
-    @Override
-    public void info (Marker marker, String s, Object ... objects) {
-        this.log.info(marker, s, objects);
-    }
-
-
-    @Override
-    public void info (Marker marker, String s, Throwable throwable) {
-        this.log.info(marker, s, throwable);
-    }
-
-
-    @Override
-    public boolean isWarnEnabled () {
-        return this.log.isWarnEnabled();
-    }
-
-
-    @Override
-    public void warn (String s) {
-        this.log.warn(s);
-    }
-
-
-    @Override
-    public void warn (String s, Object o) {
-        this.log.warn(s, o);
-    }
-
-
-    @Override
-    public void warn (String s, Object ... objects) {
-        this.log.warn(s, objects);
-    }
-
-
-    @Override
-    public void warn (String s, Object o, Object o2) {
-        this.log.warn(s, o, o2);
-    }
-
-
-    @Override
-    public void warn (String s, Throwable throwable) {
-        this.log.warn(s, throwable);
-    }
-
-
-    @Override
-    public boolean isWarnEnabled (Marker marker) {
-        return this.log.isTraceEnabled(marker);
-    }
-
-
-    @Override
-    public void warn (Marker marker, String s) {
-        this.log.warn(marker, s);
-    }
-
-
-    @Override
-    public void warn (Marker marker, String s, Object o) {
-        this.log.warn(marker, s, o);
-    }
-
-
-    @Override
-    public void warn (Marker marker, String s, Object o, Object o2) {
-        this.log.warn(marker, s, o, o2);
-    }
-
-
-    @Override
-    public void warn (Marker marker, String s, Object ... objects) {
-        this.log.warn(marker, s, objects);
-    }
-
-
-    @Override
-    public void warn (Marker marker, String s, Throwable throwable) {
-        this.log.warn(marker, s, throwable);
-    }
-
-
-    @Override
-    public boolean isErrorEnabled () {
-        return this.log.isErrorEnabled();
-    }
-
-
-    @Override
-    public void error (String s) {
-        this.log.error(s);
-    }
-
-
-    @Override
-    public void error (String s, Object o) {
-        this.log.error(s, o);
-    }
-
-
-    @Override
-    public void error (String s, Object o, Object o2) {
-        this.log.error(s, o, o2);
-    }
-
-
-    @Override
-    public void error (String s, Object ... objects) {
-        this.log.error(s, objects);
-    }
-
-
-    @Override
-    public void error (String s, Throwable throwable) {
-        this.log.error(s, throwable);
-    }
-
-
-    @Override
-    public boolean isErrorEnabled (Marker marker) {
-        return this.log.isErrorEnabled(marker);
-    }
-
-
-    @Override
-    public void error (Marker marker, String s) {
-        this.log.error(marker, s);
-    }
-
-
-    @Override
-    public void error (Marker marker, String s, Object o) {
-        this.log.error(marker, s, o);
-    }
-
-
-    @Override
-    public void error (Marker marker, String s, Object o, Object o2) {
-        this.log.error(marker, s, o, o2);
-    }
-
-
-    @Override
-    public void error (Marker marker, String s, Object ... objects) {
-        this.log.error(marker, s, objects);
-    }
-
-
-    @Override
-    public void error (Marker marker, String s, Throwable throwable) {
-        this.log.error(marker, s, throwable);
-    }
-}
diff --git a/core/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java b/core/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java
index 5aa6a5e..99c9578 100644
--- a/core/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java
+++ b/core/src/main/java/de/ids_mannheim/korap/utils/StringUtils.java
@@ -1,15 +1,15 @@
 package de.ids_mannheim.korap.utils;
 
 import org.apache.commons.lang.StringEscapeUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.*;
 
 public class StringUtils {
-    private final static Logger jlog = LoggerFactory
+    private final static Logger jlog = LogManager
             .getLogger(StringUtils.class);
 
     private static final String SEP = ";";
diff --git a/core/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java b/core/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java
index cac76bb..cd0a1ca 100644
--- a/core/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java
+++ b/core/src/main/java/de/ids_mannheim/korap/utils/TimeUtils.java
@@ -1,13 +1,13 @@
 package de.ids_mannheim.korap.utils;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.joda.time.DateTime;
 import org.joda.time.DateTimeZone;
 import org.joda.time.LocalDate;
 import org.joda.time.format.DateTimeFormat;
 import org.joda.time.format.DateTimeFormatter;
 import org.joda.time.format.ISODateTimeFormat;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
@@ -30,7 +30,7 @@
     private static DateTimeFormatter dtf = DateTimeFormat
             .forPattern("dd/MM/yyyy");
     private static final DateTimeZone dtz = DateTimeZone.forID("Europe/Berlin");
-    private static Logger jlog = LoggerFactory.getLogger(TimeUtils.class);
+    private static Logger jlog = LogManager.getLogger(TimeUtils.class);
 
 
     public static int convertTimeToSeconds (String expirationVal) {
@@ -38,7 +38,7 @@
         int finIndex = expirationVal.length() - 1;
         char entity = expirationVal.charAt(finIndex);
         int returnSec = Integer.valueOf(expirationVal.substring(0, finIndex));
-        jlog.debug("setting time value to {} with time in {}", returnSec,
+        jlog.debug("setting time value to "+returnSec+" with time in "+
                 entity);
         switch (entity) {
             case 'D':
diff --git a/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java b/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
index 9051484..41efb23 100644
--- a/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
+++ b/core/src/main/java/de/ids_mannheim/korap/web/SearchKrill.java
@@ -8,9 +8,9 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.apache.lucene.store.MMapDirectory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillCollection;
@@ -29,7 +29,7 @@
  * @author Nils Diewald
  */
 public class SearchKrill {
-    private final static Logger jlog = LoggerFactory
+    private final static Logger jlog = LogManager
             .getLogger(SearchKrill.class);
 
     // Temporary - shouldn't be here.
@@ -59,7 +59,7 @@
             };
         }
         catch (IOException e) {
-            jlog.error("Unable to loadSubTypes index: {}", e.getMessage());
+            jlog.error("Unable to loadSubTypes index:"+ e.getMessage());
         };
     };