Skip to content

Commit 1f97a60

Browse files
michalphilwebb
authored andcommitted
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
1 parent 43108d5 commit 1f97a60

File tree

2 files changed

+3
-4
lines changed
  • spring-boot-project
    • spring-boot-docs/src/main/asciidoc
    • spring-boot/src/main/resources/org/springframework/boot/logging/logback

2 files changed

+3
-4
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,13 +1270,13 @@ By default, Spring Boot picks up the native configuration from its default locat
12701270
[[howto-configure-logback-for-logging]]
12711271
=== Configure Logback for Logging
12721272
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).
1273-
Spring Boot provides a default base configuration that you can include if you want to set levels, as shown in the following example:
1273+
Spring Boot provides a default level configuration that you can include if you want to set levels, as shown in the following example:
12741274

12751275
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
12761276
----
12771277
<?xml version="1.0" encoding="UTF-8"?>
12781278
<configuration>
1279-
<include resource="org/springframework/boot/logging/logback/base.xml"/>
1279+
<include resource="org/springframework/boot/logging/logback/default.xml"/>
12801280
<logger name="org.springframework.web" level="DEBUG"/>
12811281
</configuration>
12821282
----

spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/defaults.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

33
<!--
4-
Default logback configuration provided for import, equivalent to the programmatic
5-
initialization performed by Boot
4+
Default logback configuration provided for import
65
-->
76

87
<included>

0 commit comments

Comments
 (0)