780 Star 1.5K Fork 350

开源中国 / Gitee Feedback

 / 详情

代码报错

待确认
缺陷(Bug)
创建于  
2024-03-16 17:19

需求说明

Caused by: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - 'File' option has the same value "/ruoyilog/sys-user.log" as that given for appender [file_info] defined earlier.
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - Collisions detected with FileAppender/RollingAppender instances defined earlier. Aborting.
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[sys-user] - For more information, please visit http://logback.qos.ch/codes.html#earlier_fa_collision
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:179)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.reinitialize(LogbackLoggingSystem.java:232)解决办法打开Logback配置文件:找到您的项目中Logback的配置文件,它可能是logback.xml、logback-spring.xml或类似的文件。

定位Appender配置:在Logback配置文件中,查找所有RollingFileAppender的定义,并找到file_info和sys-user两个Appender。

修改冲突的Appender配置:更改其中一个Appender的标签或标签的值,以确保每个Appender都写入不同的文件。例如:

/ruoyilog/file-info.log /ruoyilog/sys-user.log 保存配置文件:保存您对Logback配置文件所做的更改。

重新启动应用程序:重新启动您的Spring Boot应用程序,以使更改生效。

评论 (0)

铃音清凉 创建了缺陷(Bug)

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(1)
Ruby
1
https://gitee.com/oschina/git-osc.git
git@gitee.com:oschina/git-osc.git
oschina
git-osc
Gitee Feedback

搜索帮助