Skip to content

Commit

Permalink
使用tinylog记录日志
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc87112 committed Feb 14, 2022
1 parent fbf7926 commit 4212d16
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 24 additions & 3 deletions 2.x/chapter8-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<tinylog.version>2.4.1</tinylog.version>
</properties>

<dependencies>
Expand All @@ -33,9 +34,29 @@
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-api</artifactId>
<version>${tinylog.version}</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-impl</artifactId>
<version>${tinylog.version}</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>slf4j-tinylog</artifactId>
<version>${tinylog.version}</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>jcl-tinylog</artifactId>
<version>${tinylog.version}</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>log4j1.2-api</artifactId>
<version>${tinylog.version}</version>
</dependency>

<dependency>
Expand Down
2 changes: 2 additions & 0 deletions 2.x/chapter8-3/src/main/resources/tinylog.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
writer=console
writer.format={date: HH:mm:ss.SSS} {level}: {message}

0 comments on commit 4212d16

Please sign in to comment.