springboot 项目自定义log日志文件提示系统找不到指定的文件

自己尝试搭建了一个springboot项目,自定义了log日志文件,启动后报错

Logging system failed to initialize using configuration from 'logback-spring.xml'
java.io.FileNotFoundException: E:\code_demo\xxxx\logback-spring.xml (系统找不到指定的文件。)

在这里插入图片描述
log文件所在位置:
在这里插入图片描述
问题解决:在logging.config后面添加classpath,然后再指定log文件
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/fortunate_leixin/article/details/128703001