From a462255383b8ea32b2e7a0c95c4552f13d6b3500 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sun, 31 Dec 2017 02:57:14 +0900 Subject: [PATCH] Polish Closes gh-11451 --- .../appendix-application-properties.adoc | 4 +-- .../main/asciidoc/spring-boot-features.adoc | 14 ++++++---- ...itional-spring-configuration-metadata.json | 26 +++++++++---------- .../resources/custom-console-log-pattern.xml | 2 +- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 3726e4c762..9fb3b078b9 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -35,9 +35,9 @@ content into your application. Rather, pick only the properties that you need. logging.file.max-history= # Maximum of archive log files to keep. Only supported with the default logback setup. logging.file.max-size= # Maximum log file size. Only supported with the default logback setup. logging.level.*= # Log levels severity mapping. For instance, `logging.level.org.springframework=DEBUG` - logging.path= # Location of the log file. For instance, `/var/log` + logging.path= # Location of the log file. For instance, `/var/log`. logging.pattern.console= # Appender pattern for output to the console. Supported only with the default Logback setup. - logging.pattern.dateformat= # Appender pattern for log dateformat (default yyyy-MM-dd HH:mm:ss.SSS). Only supported with the default logback setup. + logging.pattern.dateformat=yyyy-MM-dd HH:mm:ss.SSS # Appender pattern for log date format. Supported only with the default Logback setup. logging.pattern.file= # Appender pattern for output to a file. Supported only with the default Logback setup. logging.pattern.level= # Appender pattern for log level (default: %5p). Supported only with the default Logback setup. logging.register-shutdown-hook=false # Register a shutdown hook for the logging system when it is initialized. diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 7ef4c4205b..19f7ca0574 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -1616,13 +1616,13 @@ To help with the customization, some other properties are transferred from the S |`logging.file.max-size` |`LOG_FILE_MAX_SIZE` -|Maximum log file size (if LOG_FILE enabled). (Only supported with the default logback +|Maximum log file size (if LOG_FILE enabled). (Only supported with the default Logback setup.) |`logging.file.max-history` |`LOG_FILE_MAX_HISTORY` |Maximum number of archive log files to keep (if LOG_FILE enabled). (Only supported with - the default logback setup.) + the default Logback setup.) |`logging.path` |`LOG_PATH` @@ -1630,18 +1630,22 @@ To help with the customization, some other properties are transferred from the S |`logging.pattern.console` |`CONSOLE_LOG_PATTERN` -|The log pattern to use on the console (stdout). (Only supported with the default logback +|The log pattern to use on the console (stdout). (Only supported with the default Logback setup.) +|`logging.pattern.dateformat` +|`LOG_DATEFORMAT_PATTERN` +|Appender pattern for log date format. (Only supported with the default Logback setup.) + |`logging.pattern.file` |`FILE_LOG_PATTERN` |The log pattern to use in a file (if `LOG_FILE` is enabled). (Only supported with the -default logback setup.) +default Logback setup.) |`logging.pattern.level` |`LOG_LEVEL_PATTERN` |The format to use when rendering the log level (default `%5p`). (Only supported with the -default logback setup.) +default Logback setup.) |`PID` |`PID` diff --git a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index b440e5e6b0..2924562836 100644 --- a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -91,6 +91,12 @@ "description": "Log levels severity mapping. For instance, 'logging.level.org.springframework=DEBUG'", "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener" }, + { + "name": "logging.path", + "type": "java.lang.String", + "description": "Location of the log file. For instance, '/var/log'.", + "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener" + }, { "name": "logging.pattern.console", "type": "java.lang.String", @@ -98,6 +104,13 @@ "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener", "defaultValue": "%clr(%d{${LOG_DATEFORMAT_PATTERN:-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.dateformat", + "type": "java.lang.String", + "description": "Appender pattern for log date format. Supported only with the default Logback setup.", + "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener", + "defaultValue": "yyyy-MM-dd HH:mm:ss.SSS" + }, { "name": "logging.pattern.file", "type": "java.lang.String", @@ -112,19 +125,6 @@ "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener", "defaultValue": "%5p" }, - { - "name": "logging.pattern.dateformat", - "type": "java.lang.String", - "description": "Appender pattern for log dateformat. Only supported with the default logback setup.", - "sourceType": "org.springframework.boot.logging.LoggingApplicationListener", - "defaultValue": "yyyy-MM-dd HH:mm:ss.SSS" - }, - { - "name": "logging.path", - "type": "java.lang.String", - "description": "Location of the log file. For instance, '/var/log'", - "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener" - }, { "name": "logging.register-shutdown-hook", "type": "java.lang.Boolean", diff --git a/spring-boot-project/spring-boot/src/test/resources/custom-console-log-pattern.xml b/spring-boot-project/spring-boot/src/test/resources/custom-console-log-pattern.xml index bf800186ce..60fd81a464 100644 --- a/spring-boot-project/spring-boot/src/test/resources/custom-console-log-pattern.xml +++ b/spring-boot-project/spring-boot/src/test/resources/custom-console-log-pattern.xml @@ -1,4 +1,4 @@ - +