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
This commit is contained in:
parent
43108d5495
commit
1f97a60d16
|
|
@ -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>
|
||||||
----
|
----
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
<?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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue