为了账号安全,请及时绑定邮箱和手机立即绑定

如何扩展Springboot logback配置?(default.xml 显然不可用)

如何扩展Springboot logback配置?(default.xml 显然不可用)

陪伴而非守候 2023-07-19 15:51:21
我正在尝试遵循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>...所以我尝试了,然后我明白了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 本身就足够了?我缺少什么?
查看完整描述

1 回答

?
holdtom

TA贡献1805条经验 获得超10个赞

似乎是文档中的拼写错误。

该文件存在于spring-boot-X.X.X.jar文件中,但其名称为defaults.xml,而不是default.xml

//img1.sycdn.imooc.com//64b796250001e54d02660637.jpg

查看完整回答
反对 回复 2023-07-19
  • 1 回答
  • 0 关注
  • 136 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号