From 2ceadd705b5c3336adf641451ca177c55f7e3fae Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 19 Jan 2016 09:32:54 +0100 Subject: [PATCH] Fix documentation of logging.path and logging.file See gh-4969 --- .../main/asciidoc/appendix-application-properties.adoc | 4 ++-- .../java/org/springframework/boot/logging/LogFile.java | 10 +++++----- .../boot/logging/LoggingApplicationListener.java | 10 +++++----- .../additional-spring-configuration-metadata.json | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index ea3b65d3d90..d927e766e18 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -42,8 +42,8 @@ content into your application; rather pick only the properties that you need. spring.main....= # see class for all properties # LOGGING - logging.path=/var/log - logging.file=myapp.log + logging.path=/var/log # directory where log files are written + logging.file=myapp.log # name of the log file logging.config= # location of config file (default classpath:logback.xml for logback) logging.level.*= # levels for loggers, e.g. "logging.level.org.springframework=DEBUG" (TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF) diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java b/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java index 4ef85af87df..3d68844fe75 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LogFile.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,14 +36,14 @@ import org.springframework.util.StringUtils; public class LogFile { /** - * The name of the Spring property that contains the name of the logging configuration - * file. + * The name of the Spring property that contains the name of the log file. Names can + * be an exact location or relative to the current directory. */ public static final String FILE_PROPERTY = "logging.file"; /** - * The name of the Spring property that contains the path where the logging - * configuration can be found. + * The name of the Spring property that contains the directory where log files are + * written. */ public static final String PATH_PROPERTY = "logging.path"; diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 3fe1f4dbf53..5f44d8cee4b 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * Copyright 2012-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -72,14 +72,14 @@ public class LoggingApplicationListener implements SmartApplicationListener { public static final String CONFIG_PROPERTY = "logging.config"; /** - * The name of the Spring property that contains the path where the logging - * configuration can be found. + * The name of the Spring property that contains the directory where log files are + * written. */ public static final String PATH_PROPERTY = LogFile.PATH_PROPERTY; /** - * The name of the Spring property that contains the name of the logging configuration - * file. + * The name of the Spring property that contains the name of the log file. Names can + * be an exact location or relative to the current directory. */ public static final String FILE_PROPERTY = LogFile.FILE_PROPERTY; 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 3cf3e0275e9..6a88fc93e6b 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 @@ -32,7 +32,7 @@ { "name": "logging.file", "type": "java.lang.String", - "description": "Log file name.", + "description": "Name of the log file. Names can be an exact location or relative to the current directory.", "sourceType": "org.springframework.boot.logging.LoggingApplicationListener" }, { @@ -44,7 +44,7 @@ { "name": "logging.path", "type": "java.lang.String", - "description": "Location of the log file.", + "description": "Directory where log files are written.", "sourceType": "org.springframework.boot.logging.LoggingApplicationListener" }, {