log4j-slf4j-impl can not be present
时间: 2023-11-10 15:17:08 浏览: 100
log4j-slf4j-impl组件无法与log4j-to-slf4j共存,会导致Spring Boot的日志冲突。这个问题通常在引入第三方组件时出现。具体原因是项目中同时使用了两种日志框架logback和log4j,并且它们都遵守了slf4j的定义并进行了实现。当进行日志转换时,例如从log4j2转换到logback或者从logback转换到log4j2时,就会出现转换冲突,其中之一即为log4j-slf4j-impl。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [log4j-slf4j-impl cannot be present with log4j-to-slf4j --- springBoot日志冲突](https://blog.csdn.net/weixin_44653963/article/details/119177570)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [log4j-slf4j-impl cannot be present with log4j-to-slf4j](https://blog.csdn.net/supingemail/article/details/112944282)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文