We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2df2b69 commit a08fe75Copy full SHA for a08fe75
IV. Spring Boot features/26.2.1 Color-coded output.md
@@ -1,2 +1,20 @@
1
### 26.2.1 Color-coded输出
2
-如果你的终端支持ANSI,Spring Boot将使用不同颜色输出日志以便争强可读性(color output)。
+如果你的终端支持ANSI,Spring Boot将使用彩色编码(color output)输出日志以增强可读性,你可以将`spring.output.ansi.enabled`设置为一个[支持的值](http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/api/org/springframework/boot/ansi/AnsiOutput.Enabled.html)来覆盖默认设置。
3
+
4
+彩色编码(Color coding)使用`%clr`表达式进行配置,在其最简单的形式中,转换器会根据日志级别使用不同的颜色输出日志,例如:
5
+```java
6
+%clr(%5p)
7
+```
8
+日志级别到颜色的映射如下:
9
+|Level|Color|
10
+|---|---|
11
+|`FATAL`|Red|
12
+|`ERROR`|Red|
13
+|`WARN`|Yellow|
14
+|`INFO`|Green|
15
+|`DEBUG`|Green|
16
+|`TRACE`|Green|
17
18
+另外,
19
20
0 commit comments