Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 41fa1ec

Browse files
authored
fix(log):replace log4j by logback (#45)
1 parent d55a9c0 commit 41fa1ec

File tree

8 files changed

+136
-244
lines changed

8 files changed

+136
-244
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ build/
1010
*.txt
1111
target/
1212
*.versionsBackup
13+
logs/
1314

backend/pom.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
<java.version>1.8</java.version>
3939
<skipTests>true</skipTests>
4040
<spotless.version>2.4.2</spotless.version>
41+
<slf4j.version>1.7.12</slf4j.version>
42+
<logback.version>1.2.11</logback.version>
4143
</properties>
4244

4345

@@ -61,8 +63,14 @@
6163
</dependency>
6264

6365
<dependency>
64-
<groupId>org.springframework.boot</groupId>
65-
<artifactId>spring-boot-starter-log4j2</artifactId>
66+
<groupId>org.slf4j</groupId>
67+
<artifactId>slf4j-api</artifactId>
68+
<version>${slf4j.version}</version>
69+
</dependency>
70+
<dependency>
71+
<groupId>ch.qos.logback</groupId>
72+
<artifactId>logback-classic</artifactId>
73+
<version>${logback.version}</version>
6674
</dependency>
6775

6876

backend/src/main/resources/application-dev.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#
1919

2020
# Designate the log configuration file
21-
logging.config=classpath:log4j2.xml
21+
logging.classpath=logback.xml
2222

2323
# Set port and context path
2424
server.port=9090

backend/src/main/resources/application-prod.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# under the License.
1818
#
1919

20-
logging.config=classpath:log4j2-prod.xml
20+
logging.classpath=logback.xml
2121

2222
server.port=9089
2323
server.servlet.context-path=/api

backend/src/main/resources/application-test.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
# under the License.
1818
#
1919

20-
logging.config=classpath:log4j2.xml
21-
20+
logging.classpath=logback.xml
2221
server.port=8079
2322
server.servlet.context-path=/api
2423

backend/src/main/resources/log4j2-prod.xml

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

backend/src/main/resources/log4j2.xml

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

0 commit comments

Comments
 (0)