Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
97c5a1b3
Commit
97c5a1b3
authored
Jan 15, 2016
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.x'
parents
11070796
2f2bba4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
howto.adoc
spring-boot-docs/src/main/asciidoc/howto.adoc
+18
-7
No files found.
spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
97c5a1b3
...
...
@@ -1358,14 +1358,25 @@ samples for more detail and to see it in action.
[[howto-configure-log4j-for-logging-yaml-or-json-config]]
==== Use YAML or JSON to configure Log4j 2
In addition to its default XML configuration format, Log4j 2 also supports YAML and JSON
configuration files. To configure Log4j 2 to use an alternative configuration file format
all you need to do is add an appropriate dependency to the classpath. To use YAML, add a
dependency on `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` and Log4j 2 will
look for configuration files names `log4j2.yaml` or `log4j2.yml`. To use JSON, add a
dependency on `com.fasterxml.jackson.core:jackson-databind` and Log4j 2 will look for
configuration files named `log4j2.json` or `log4j2.jsn`
configuration files. To configure Log4j 2 to use an alternative configuration file format,
add the appropriate dependencies to the classpath and name your
configuration files to match your chosen file format:
[cols="10,75,15"]
|===
|Format|Dependencies|File names
|YAML
a| `com.fasterxml.jackson.core:jackson-databind` +
`com.fasterxml.jackson.dataformat:jackson-dataformat-yaml`
a| `log4j2.yaml` +
`log4j2.yml`
|JSON
a| `com.fasterxml.jackson.core:jackson-databind`
a| `log4j2.json` +
`log4j2.jsn`
|===
[[howto-data-access]]
== Data Access
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment