Commit 5a9621840c957db0545a9a0ac80d784e3d647a96
1 parent
e73d0006
修改控制台输出日志格式,增加显示线程名称,调用类的全类路径以及日子输出行的行号。
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/resources/logback-spring.xml
| ... | ... | @@ -4,8 +4,8 @@ |
| 4 | 4 | <springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/> |
| 5 | 5 | <property name="LOG_HOME" value="logs" /> |
| 6 | 6 | |
| 7 | - <substitutionProperty name="log.pattern" value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(---){faint} %clr(%-1.30logger{0}){cyan} %clr(:){faint} %m%n%wEx"/> | |
| 8 | - | |
| 7 | + <substitutionProperty name="log.pattern" | |
| 8 | + value="%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr([%thread]) %clr(%5p) %clr(---){faint} %clr(%logger{50}){cyan} %clr(:) %clr(%L){faint} %m%n%wEx"/> | |
| 9 | 9 | <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/> |
| 10 | 10 | <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/> |
| 11 | 11 | <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/> | ... | ... |