I am trying to follow the Springboot logback customisation instructions.
I want to obtain basically the default behaviour (so I can then add it it).
That page says:
A typical custom logback.xml file would look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/default.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
<logger name="org.springframework.web" level="DEBUG"/>
</configuration>
... so I tried that, and I get
WARN in ch.qos.logback.core.joran.action.IncludeAction - Could not find resource corresponding to [org/springframework/boot/logging/logback/default.xml]
I have this lot in my build.gradle:
dependencies {
implementation(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-logging',
... in theory I think starter-web on its own should be enough?
What am I missing?
Seems to be a typo in the documentation.
The file is present in the spring-boot-X.X.X.jar
file, but it's named defaults.xml
, not default.xml
.