Skip to content

Commit 6574fee

Browse files
committed
Document limitations of logging.pattern.*
Closes gh-5653
1 parent ec7d638 commit 6574fee

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,15 +1246,15 @@ To help with the customization some other properties are transferred from the Sp
12461246

12471247
|`logging.pattern.console`
12481248
|`CONSOLE_LOG_PATTERN`
1249-
|The log pattern to use on the console (stdout). (Not supported with JDK logger.)
1249+
|The log pattern to use on the console (stdout). (Only supported with the default logback setup.)
12501250

12511251
|`logging.pattern.file`
12521252
|`FILE_LOG_PATTERN`
1253-
|The log pattern to use in a file (if LOG_FILE enabled). (Not supported with JDK logger.)
1253+
|The log pattern to use in a file (if LOG_FILE enabled). (Only supported with the default logback setup.)
12541254

12551255
|`logging.pattern.level`
12561256
|`LOG_LEVEL_PATTERN`
1257-
|The format to use to render the log level (default `%5p`). (The `logging.pattern.level` form is only supported by Logback.)
1257+
|The format to use to render the log level (default `%5p`). (Only supported with the default logback setup.)
12581258

12591259
|`PID`
12601260
|`PID`

spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,15 @@
5252
"name": "logging.pattern.console",
5353
"type": "java.lang.String",
5454
"description": "Appender pattern for output to the console. Only supported with the default logback setup.",
55-
"sourceType": "org.springframework.boot.logging.LoggingApplicationListener"
55+
"sourceType": "org.springframework.boot.logging.LoggingApplicationListener",
56+
"defaultValue": "%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"
5657
},
5758
{
5859
"name": "logging.pattern.file",
5960
"type": "java.lang.String",
6061
"description": "Appender pattern for output to the file. Only supported with the default logback setup.",
61-
"sourceType": "org.springframework.boot.logging.LoggingApplicationListener"
62+
"sourceType": "org.springframework.boot.logging.LoggingApplicationListener",
63+
"defaultValue": "%d{yyyy-MM-dd HH:mm:ss.SSS} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"
6264
},
6365
{
6466
"name": "logging.pattern.level",

0 commit comments

Comments
 (0)