Skip to content

Commit

Permalink
!32 修改日志格式,在控制台输出不同颜色不同类别日志,更方便调试
Browse files Browse the repository at this point in the history
Merge pull request !32 from 一枝梧叶/dev
  • Loading branch information
zhangyd-c authored and gitee-org committed Aug 31, 2021
2 parents 15edb71 + 4f390c0 commit 7fb3c6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion blog-admin/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<!-- 控制台 appender -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%class:%line] %-5level - %msg%n</pattern>
<pattern>
%yellow(%date{yyyy-MM-dd HH:mm:ss}) [%highlight(%-5level)] [%magenta(%thread)] %green(%c.%M\(%F:%L\)) %n%msg%n%n
</pattern>
</encoder>
</appender>

Expand Down
4 changes: 3 additions & 1 deletion blog-web/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
<!-- 控制台 appender -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%class:%line] %-5level - %msg%n</pattern>
<pattern>
%yellow(%date{yyyy-MM-dd HH:mm:ss}) [%highlight(%-5level)] [%magenta(%thread)] %green(%c.%M\(%F:%L\)) %n%msg%n%n
</pattern>
</encoder>
</appender>

Expand Down

0 comments on commit 7fb3c6c

Please sign in to comment.