天道酬勤,学无止境

log4j slf4j logback

tomcat 日志log4j,slf4j,logback冲突

问题描述: 启动tomcat,发现tomcat无法启动,catalina.out有如下错误日志:INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError: Could not initialize class org.apache.log4j.Log4jLoggerFactory at org.apache.log4j.LogManager.getLogger(LogManager.java:44) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory

2021-05-11 23:51:30    分类:博客    log4j slf4j logback   java