【发布时间】:2019-09-08 02:28:34
【问题描述】:
我正在尝试关注the Springboot logback customisation instructions。
我想获得基本的默认行为(所以我可以添加它)。
那个页面说:
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>
...所以我尝试了,我得到了
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',
...理论上我认为 starter-web 本身就足够了?
我错过了什么?
【问题讨论】:
标签: java spring-boot logback