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
29e87257
Commit
29e87257
authored
Jun 21, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide Gradle example for using Log4j2
Closes gh-12729
parent
8a0f0354
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
howto.adoc
spring-boot-docs/src/main/asciidoc/howto.adoc
+18
-1
No files found.
spring-boot-docs/src/main/asciidoc/howto.adoc
View file @
29e87257
...
@@ -1648,7 +1648,7 @@ instead. If you aren't using the starters then you need to provide `jcl-over-slf
...
@@ -1648,7 +1648,7 @@ instead. If you aren't using the starters then you need to provide `jcl-over-slf
(at least) in addition to Log4j 2.
(at least) in addition to Log4j 2.
The simplest path is probably through the starters, even though it requires some
The simplest path is probably through the starters, even though it requires some
jiggling with excludes
, .e.g.
in Maven:
jiggling with excludes
. The following example shows how to set up the starters
in Maven:
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
----
----
...
@@ -1672,6 +1672,23 @@ jiggling with excludes, .e.g. in Maven:
...
@@ -1672,6 +1672,23 @@ jiggling with excludes, .e.g. in Maven:
</dependency>
</dependency>
----
----
And the following example shows one way to set up the starters in Gradle:
[source,groovy,indent=0,subs="verbatim,quotes,attributes"]
----
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-log4j2'
}
configurations {
all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}
----
NOTE: The use of the Log4j starters gathers together the dependencies for common logging
NOTE: The use of the Log4j starters gathers together the dependencies for common logging
requirements (e.g. including having Tomcat use `java.util.logging` but configuring the
requirements (e.g. including having Tomcat use `java.util.logging` but configuring the
output using Log4j 2). See the Actuator Log4j 2 samples for more detail and to see it in
output using Log4j 2). See the Actuator Log4j 2 samples for more detail and to see it in
...
...
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