Prettify Log4J 2's default output
This commit updates the default output produced when using Log2J 2 to be similar to the output produced by Logback. It introduces a new converter for throwables that adds some whitespace around stacktraces and a color converter that produces ANSI-colored output when enabled via spring.output.ansi.enabled. Closes gh-3548
This commit is contained in:
committed by
Andy Wilkinson
parent
65efd1725f
commit
632d78b6fb
@@ -2,7 +2,7 @@
|
||||
<Configuration status="WARN" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="PID">????</Property>
|
||||
<Property name="LOG_PATTERN">[%d{yyyy-MM-dd HH:mm:ss.SSS}] log4j2%X{context} - ${sys:PID} %5p [%t] --- %c{1}: %m%n</Property>
|
||||
<Property name="LOG_PATTERN">%clr{%d{yyyy-MM-dd HH:mm:ss.SSS}}{faint} %clr{%5p} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n%wEx</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT" follow="true">
|
||||
|
||||
Reference in New Issue
Block a user