migrated to slf4j
This commit is contained in:
@ -21,13 +21,9 @@
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
</dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
|
||||
@ -14,9 +14,8 @@ import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
@ -25,7 +24,7 @@ import org.apache.logging.log4j.Logger;
|
||||
*/
|
||||
public class AuthenticationFilter implements Filter {
|
||||
|
||||
private final static Logger LOGGER = LogManager.getLogger(AuthenticationFilter.class);
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(AuthenticationFilter.class);
|
||||
private final static String USER = AuthenticationFilter.class.getName() + "_user";
|
||||
private String loginPage;
|
||||
private String errorPage;
|
||||
@ -93,7 +92,7 @@ public class AuthenticationFilter implements Filter {
|
||||
pw.print("</html>");
|
||||
|
||||
} catch (Exception ex) {
|
||||
LOGGER.log(Level.ERROR, errorMsg, ex);
|
||||
LOGGER.error(errorMsg, ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration>
|
||||
<Appenders>
|
||||
<Console name="STDOUT" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Logger name="org.apache.log4j.xml" level="info"/>
|
||||
<Root level="debug">
|
||||
<AppenderRef ref="STDOUT"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
Reference in New Issue
Block a user