首页 > 其他 > 详细

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath

时间:2020-04-06 22:56:36      阅读:85      评论:0      收藏:0      [点我收藏+]

问题描述:

Struts2框架导入项目时使用了min版本下的jar,项目编写初期没有错误,加入文件上传下载后出现“ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath”

 

问题解决方案:

下载对应版本的jar并导入

然后需要在Src目录下创建配置文件log4j2.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
        </Console>
    </Appenders>
    <Loggers>
        <Root level="info">
            <AppenderRef ref="Console"/>
        </Root>
    </Loggers>
</Configuration>

重启服务器后项目正常运行

 

原文链接:https://www.cnblogs.com/zjulanjian/p/10955285.html

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath

原文:https://www.cnblogs.com/YFEYI/p/12650130.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!