File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed
spring-boot-docs/src/main/asciidoc Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -1259,14 +1259,25 @@ samples for more detail and to see it in action.
12591259[[howto-configure-log4j-for-logging-yaml-or-json-config]]
12601260==== Use YAML or JSON to configure Log4j 2
12611261In addition to its default XML configuration format, Log4j 2 also supports YAML and JSON
1262- configuration files. To configure Log4j 2 to use an alternative configuration file format
1263- all you need to do is add an appropriate dependency to the classpath. To use YAML, add a
1264- dependency on `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` and Log4j 2 will
1265- look for configuration files names `log4j2.yaml` or `log4j2.yml`. To use JSON, add a
1266- dependency on `com.fasterxml.jackson.core:jackson-databind` and Log4j 2 will look for
1267- configuration files named `log4j2.json` or `log4j2.jsn`
1268-
1262+ configuration files. To configure Log4j 2 to use an alternative configuration file format,
1263+ add the appropriate dependencies to the classpath and name your
1264+ configuration files to match your chosen file format:
12691265
1266+ [cols="10,75,15"]
1267+ |===
1268+ |Format|Dependencies|File names
1269+
1270+ |YAML
1271+ a| `com.fasterxml.jackson.core:jackson-databind` +
1272+ `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml`
1273+ a| `log4j2.yaml` +
1274+ `log4j2.yml`
1275+
1276+ |JSON
1277+ a| `com.fasterxml.jackson.core:jackson-databind`
1278+ a| `log4j2.json` +
1279+ `log4j2.jsn`
1280+ |===
12701281
12711282[[howto-data-access]]
12721283== Data Access
You can’t perform that action at this time.
0 commit comments