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

搭建SSM框架运行,打印输出

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

报错提示需要添加 log4j-core的jar包



    org.apache.logging.log4j
    log4j-core
    2.11.1

添加过maven文件后再次启动

又报错误

ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2

这时需要在classpath中添加log4j2.xml文件



    
        
            
        
        
            
        
    

    
        
            
        
        
            
        
    

再次运行

你可能感兴趣的:(Java,BUG,java,log4j-core)