Rename logging.file to logging.file.name

See gh-15089
This commit is contained in:
TwinProduction
2018-11-04 17:03:45 -05:00
committed by Stephane Nicoll
parent 56ae9cfc7a
commit 21da4a5d12
17 changed files with 212 additions and 49 deletions

View File

@@ -37,12 +37,12 @@ content into your application. Rather, pick only the properties that you need.
# LOGGING
logging.config= # Location of the logging configuration file. For instance, `classpath:logback.xml` for Logback.
logging.exception-conversion-word=%wEx # Conversion word used when logging exceptions.
logging.file= # Log file name (for instance, `myapp.log`). Names can be an exact location or relative to the current directory.
logging.file.name= # Log file name (for instance, `myapp.log`). Names can be an exact location or relative to the current directory.
logging.file.max-history=0 # Maximum of archive log files to keep. Only supported with the default logback setup.
logging.file.max-size=10MB # Maximum log file size. Only supported with the default logback setup.
logging.group.*= # Log groups to quickly change multiple loggers at the same time. For instance, `logging.level.db=org.hibernate,org.springframework.jdbc`.
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.file.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=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.

View File

@@ -1518,7 +1518,7 @@ in the following example:
----
You can also set the location of a file to which to write the log (in addition to the
console) by using "logging.file".
console) by using "logging.file.name".
To configure the more fine-grained settings of a logging system, you need to use the native
configuration format supported by the `LoggingSystem` in question. By default, Spring Boot
@@ -1548,8 +1548,8 @@ If you look at `base.xml` in the spring-boot jar, you can see that it uses
some useful System properties that the `LoggingSystem` takes care of creating for you:
* `${PID}`: The current process ID.
* `${LOG_FILE}`: Whether `logging.file` was set in Boot's external configuration.
* `${LOG_PATH}`: Whether `logging.path` (representing a directory for
* `${LOG_FILE}`: Whether `logging.file.name` was set in Boot's external configuration.
* `${LOG_PATH}`: Whether `logging.file.path` (representing a directory for
log files to live in) was set in Boot's external configuration.
* `${LOG_EXCEPTION_CONVERSION_WORD}`: Whether `logging.exception-conversion-word` was set
in Boot's external configuration.
@@ -1582,12 +1582,12 @@ shown in the following example:
</configuration>
----
You also need to add `logging.file` to your `application.properties`, as shown in the
You also need to add `logging.file.name` to your `application.properties`, as shown in the
following example:
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
----
logging.file=myapplication.log
logging.file.name=myapplication.log
----

View File

@@ -164,7 +164,7 @@ use the following additional endpoints:
|Yes
|`logfile`
|Returns the contents of the logfile (if `logging.file` or `logging.path` properties have
|Returns the contents of the logfile (if `logging.file.name` or `logging.file.path` properties have
been set). Supports the use of the HTTP `Range` header to retrieve part of the log file's
content.
|Yes

View File

@@ -1686,7 +1686,7 @@ The following colors and styles are supported:
=== File Output
By default, Spring Boot logs only to the console and does not write log files. If you
want to write log files in addition to the console output, you need to set a
`logging.file` or `logging.path` property (for example, in your
`logging.file.name` or `logging.file.path` property (for example, in your
`application.properties`).
The following table shows how the `logging.*` properties can be used together:
@@ -1694,7 +1694,7 @@ The following table shows how the `logging.*` properties can be used together:
.Logging properties
[cols="1,1,1,4"]
|===
|`logging.file` |`logging.path` |Example |Description
|`logging.file.name` |`logging.file.path` |Example |Description
|_(none)_
|_(none)_
@@ -1835,7 +1835,7 @@ To help with the customization, some other properties are transferred from the S
|`LOG_EXCEPTION_CONVERSION_WORD`
|The conversion word used when logging exceptions.
|`logging.file`
|`logging.file.name`
|`LOG_FILE`
|If defined, it is used in the default log configuration.
@@ -1849,7 +1849,7 @@ setup.)
|Maximum number of archive log files to keep (if LOG_FILE enabled). (Only supported with
the default Logback setup.)
|`logging.path`
|`logging.file.path`
|`LOG_PATH`
|If defined, it is used in the default log configuration.