Polish "Add support for optional Log4J2 configuration"

See gh-44488

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
This commit is contained in:
Stéphane Nicoll
2025-04-17 13:59:53 +02:00
parent 48154a393f
commit 0e347afd31
3 changed files with 27 additions and 29 deletions

View File

@@ -202,4 +202,8 @@ Log4j 2 has support for combining multiple configuration files into a single com
To use this support in Spring Boot, configure configprop:logging.log4j2.config.override[] with the locations of one or more secondary configuration files.
The secondary configuration files will be merged with the primary configuration, whether the primary's source is Spring Boot's defaults, a standard location such as `log4j.xml`, or the location configured by the configprop:logging.config[] property.
NOTE: Log4j2 override configuration file locations can be prefixed with `optional:`, for example, `optional:classpath:log4j2-override.xml`, to indicate that the location is optional and should only be loaded if the resource exists.
[NOTE]
====
Log4j2 override configuration file locations can be prefixed with `optional:`.
For example, `optional:classpath:log4j2-override.xml` indicates that `log4j2-override.xml` should only be loaded if the resource exists.
====