Skip to content

Commit 80cfd5e

Browse files
committed
Merge branch '3.3.x'
Closes gh-41517
2 parents d22d2e8 + 30d34c0 commit 80cfd5e

File tree

1 file changed

+13
-10
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features

1 file changed

+13
-10
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/logging.adoc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,30 +134,33 @@ The following colors and styles are supported:
134134

135135
By default, Spring Boot logs only to the console and does not write log files.
136136
If you want to write log files in addition to the console output, you need to set a configprop:logging.file.name[] or configprop:logging.file.path[] property (for example, in your `application.properties`).
137+
If both properties are set, `logging.file.path` is ignored and only `logging.file.name` is used.
137138

138139
The following table shows how the `logging.*` properties can be used together:
139140

140141
.Logging properties
141-
[cols="1,1,1,4"]
142+
[cols="1,1,4"]
142143
|===
143-
| configprop:logging.file.name[] | configprop:logging.file.path[] | Example | Description
144+
| configprop:logging.file.name[] | configprop:logging.file.path[] | Description
144145

145146
| _(none)_
146147
| _(none)_
147-
|
148148
| Console only logging.
149149

150-
| Specific file
150+
| Specific file (for example, `my.log`)
151151
| _(none)_
152-
| `my.log`
153-
| Writes to the specified log file.
154-
Names can be an exact location or relative to the current directory.
152+
| Writes to the location specified by `logging.file.name`.
153+
The location can be absolute or relative to the current directory.
155154

156155
| _(none)_
156+
| Specific directory (for example, `/var/log`)
157+
| Writes `spring.log` to the directory specified by `logging.file.path`.
158+
The directory can be absolute or relative to the current directory.
159+
160+
| Specific file
157161
| Specific directory
158-
| `/var/log`
159-
| Writes `spring.log` to the specified directory.
160-
Names can be an exact location or relative to the current directory.
162+
| Writes to the location specified by `logging.file.name` and ignores `logging.file.path`.
163+
The location can be absolute or relative to the current directory.
161164
|===
162165

163166
Log files rotate when they reach 10 MB and, as with console output, `ERROR`-level, `WARN`-level, and `INFO`-level messages are logged by default.

0 commit comments

Comments
 (0)