Logback configuration error detected:'File' option has the same value "xxx.log" as that given for appender [FILE] defined earlier.

一、报错信息

ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE-INFO] - 'File' option has the same value "xxx.log" as that given for appender [FILE] defined earlier.
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE-INFO] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE-INFO] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision

二、问题原因

logback-spring.xml 配置文件中多了一行配置
< include resource=“org/springframework/boot/logging/logback/base.xml” />

三、解决

检查 logback-spring.xml 配置文件
将< include resource=“XXX” /> 注释掉即可启动成功

配置文件

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐