1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-12 17:26:13 +00:00

Closes #378: silence useless log from Jersey

This commit is contained in:
bgamard
2020-02-14 21:33:34 +01:00
parent 90a49efa4a
commit 89228a52dc
6 changed files with 21 additions and 4 deletions

View File

@@ -68,6 +68,11 @@
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<!-- Test dependencies -->
<dependency>

View File

@@ -11,6 +11,7 @@ import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.bridge.SLF4JBridgeHandler;
import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;
@@ -57,6 +58,8 @@ public class RequestContextFilter implements Filter {
fileAppender.setMaxBackupIndex(5);
fileAppender.activateOptions();
org.apache.log4j.Logger.getRootLogger().addAppender(fileAppender);
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
// Initialize the application context
TransactionUtil.handle(AppContext::getInstance);