From 6574feea873afd00753abe0004724b9d6ea51b8f Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 16 Jun 2016 15:44:10 +0200 Subject: [PATCH] Document limitations of logging.pattern.* Closes gh-5653 --- .../src/main/asciidoc/spring-boot-features.adoc | 6 +++--- .../META-INF/additional-spring-configuration-metadata.json | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 28cbe646a20..be2390d1dda 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1246,15 +1246,15 @@ To help with the customization some other properties are transferred from the Sp |`logging.pattern.console` |`CONSOLE_LOG_PATTERN` -|The log pattern to use on the console (stdout). (Not supported with JDK logger.) +|The log pattern to use on the console (stdout). (Only supported with the default logback setup.) |`logging.pattern.file` |`FILE_LOG_PATTERN` -|The log pattern to use in a file (if LOG_FILE enabled). (Not supported with JDK logger.) +|The log pattern to use in a file (if LOG_FILE enabled). (Only supported with the default logback setup.) |`logging.pattern.level` |`LOG_LEVEL_PATTERN` -|The format to use to render the log level (default `%5p`). (The `logging.pattern.level` form is only supported by Logback.) +|The format to use to render the log level (default `%5p`). (Only supported with the default logback setup.) |`PID` |`PID` diff --git a/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index bd482821348..29f6563a9f6 100644 --- a/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -52,13 +52,15 @@ "name": "logging.pattern.console", "type": "java.lang.String", "description": "Appender pattern for output to the console. Only supported with the default logback setup.", - "sourceType": "org.springframework.boot.logging.LoggingApplicationListener" + "sourceType": "org.springframework.boot.logging.LoggingApplicationListener", + "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}" }, { "name": "logging.pattern.file", "type": "java.lang.String", "description": "Appender pattern for output to the file. Only supported with the default logback setup.", - "sourceType": "org.springframework.boot.logging.LoggingApplicationListener" + "sourceType": "org.springframework.boot.logging.LoggingApplicationListener", + "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}" }, { "name": "logging.pattern.level",