Commit 1f97a60d authored by michal's avatar michal Committed by Phillip Webb

Clarify documentation on logback include files

Update documentation and comments on Logback to show the correct
use of `default.xml` rather than `base.xml`.

See gh-16901
parent 43108d54
...@@ -1270,13 +1270,13 @@ By default, Spring Boot picks up the native configuration from its default locat ...@@ -1270,13 +1270,13 @@ By default, Spring Boot picks up the native configuration from its default locat
[[howto-configure-logback-for-logging]] [[howto-configure-logback-for-logging]]
=== Configure Logback for Logging === Configure Logback for Logging
If you put a `logback.xml` in the root of your classpath, it is picked up from there (or from `logback-spring.xml`, to take advantage of the templating features provided by Boot). If you put a `logback.xml` in the root of your classpath, it is picked up from there (or from `logback-spring.xml`, to take advantage of the templating features provided by Boot).
Spring Boot provides a default base configuration that you can include if you want to set levels, as shown in the following example: Spring Boot provides a default level configuration that you can include if you want to set levels, as shown in the following example:
[source,xml,indent=0,subs="verbatim,quotes,attributes"] [source,xml,indent=0,subs="verbatim,quotes,attributes"]
---- ----
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/> <include resource="org/springframework/boot/logging/logback/default.xml"/>
<logger name="org.springframework.web" level="DEBUG"/> <logger name="org.springframework.web" level="DEBUG"/>
</configuration> </configuration>
---- ----
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <!--
Default logback configuration provided for import, equivalent to the programmatic Default logback configuration provided for import
initialization performed by Boot
--> -->
<included> <included>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment