Skip to content

Commit 7e7ecc2

Browse files
authored
Using only slf4j and making the log4j binding provided (#12)
1 parent 70fb182 commit 7e7ecc2

File tree

5 files changed

+31
-20
lines changed

5 files changed

+31
-20
lines changed

pom.xml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5252
<maven.compiler.source>1.8</maven.compiler.source>
5353
<maven.compiler.target>1.8</maven.compiler.target>
54-
<bullet.core.version>1.5.1</bullet.core.version>
54+
<bullet.core.version>1.5.2</bullet.core.version>
55+
<slf4j.version>1.7.32</slf4j.version>
56+
<log4j.version>2.17.1</log4j.version>
5557
<pulsar.client.version>2.2.1</pulsar.client.version>
5658
</properties>
5759

@@ -74,10 +76,11 @@
7476
<version>1.2.17</version>
7577
<scope>provided</scope>
7678
</dependency>
79+
<!-- Provided even though we build a fat jar since the application including this should provide the binding -->
7780
<dependency>
78-
<groupId>org.slf4j</groupId>
79-
<artifactId>slf4j-log4j12</artifactId>
80-
<version>1.7.10</version>
81+
<groupId>org.apache.logging.log4j</groupId>
82+
<artifactId>log4j-slf4j-impl</artifactId>
83+
<version>${log4j.version}</version>
8184
<scope>provided</scope>
8285
</dependency>
8386
<dependency>
@@ -86,6 +89,12 @@
8689
<version>1.18.2</version>
8790
<scope>provided</scope>
8891
</dependency>
92+
93+
<dependency>
94+
<groupId>org.slf4j</groupId>
95+
<artifactId>slf4j-api</artifactId>
96+
<version>${slf4j.version}</version>
97+
</dependency>
8998
<dependency>
9099
<groupId>com.yahoo.bullet</groupId>
91100
<artifactId>bullet-core</artifactId>

src/main/resources/log4j.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/main/resources/log4j2.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
status=warn
2+
3+
appender.console.type=Console
4+
appender.console.name=STDOUT
5+
appender.console.layout.type=PatternLayout
6+
appender.console.layout.pattern=[%-5p] %d{ISO8601} %c - %m%n
7+
8+
rootLogger.level=info
9+
rootLogger.appenderRef.stdout.ref=STDOUT

src/test/resources/log4j.properties

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/test/resources/log4j2.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
status=warn
2+
3+
appender.console.type=Console
4+
appender.console.name=STDOUT
5+
appender.console.layout.type=PatternLayout
6+
appender.console.layout.pattern=[%-5p] %d{ISO8601} %c - %m%n
7+
8+
rootLogger.level=fatal
9+
rootLogger.appenderRef.stdout.ref=STDOUT

0 commit comments

Comments
 (0)