Gre*_*ade 2 java logback spring-boot
我正在尝试按照Springboot logback 自定义说明进行操作。
我想获得基本上默认的行为(所以我可以添加它)。
那个页面说:
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>
Run Code Online (Sandbox Code Playgroud)
......所以我试过了,我得到了
ch.qos.logback.core.joran.action.IncludeAction 中的警告 - 找不到对应于 [org/springframework/boot/logging/logback/default.xml] 的资源
我的 build.gradle 中有很多:
dependencies {
implementation(
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-logging',
Run Code Online (Sandbox Code Playgroud)
...理论上我认为 starter-web 本身就足够了?
我错过了什么?