经过排查,发现项目里面的日志组件是logback, slf4j的一个实现方式。有效日志如下所示。
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/home/app/tomcat_m/webapps/ROOT/WEB-INF/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/home/app/tomcat_m/webapps/ROOT/WEB-INF/lib/logback-classic-1.1.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
所以 ,有效信息就出来了啊,一个借口对应了多个实现,解决方法so easy,删掉了多余的那个jar包。
slf4j-log4j12-1.6.1.jar
时间: 2024-10-22 10:08:42