Updated log4j configuration using Log4j 2 and JUL.
Change-Id: I90b3c44ca73701b711a8948442c5aeef21d6feb0
diff --git a/pom.xml b/pom.xml
index 5ca6b15..bfaa8a4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,6 +24,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
+ <configuration>
+ <argLine>-Dmockserver.logLevel=OFF
+ -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager</argLine>
+ </configuration>
</plugin>
</plugins>
</build>
@@ -31,7 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jersey.version>1.19.4</jersey.version>
- <slf4j.version>1.7.30</slf4j.version>
+ <log4j.version>2.14.1</log4j.version>
</properties>
<dependencies>
@@ -63,16 +67,7 @@
<artifactId>jackson-databind</artifactId>
<version>2.12.2</version>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jdk14</artifactId>
- <version>${slf4j.version}</version>
- </dependency>
+
<dependency>
<groupId>org.apache.directory.studio</groupId>
<artifactId>org.apache.commons.lang</artifactId>
@@ -91,6 +86,28 @@
<scope>test</scope>
</dependency>
+ <!-- logging -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-jul</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+
<!-- Mockserver -->
<dependency>
<groupId>org.mock-server</groupId>