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


問題描述:

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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM