ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath
问题: ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console..
场景: 在配置SSH的时候遇到了这个错误, 然后就需要找一下问题
分析: 按照英文提示, 是说缺少了一个log4j-core.jar的日志核心包
解决方法: 下载log4j-core.jar包
下载地址:
http://central.maven.org/maven2/org/apache/logging/log4j/log4j-core/2.11.2/log4j-core-2.11.2.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>
重启tomcat,ok!
注意! 必须要重启tomcat! 而且要把out目录下的web.xml文件删除掉
因为Tomcat执行的时候, 是按照out目录下面的web.xml去执行的.
如果没有重启tomcat, 这个错误会一直都在, 重启了之后就没有了!

参考资料: https://ask.csdn.net/questions/663142
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath的更多相关文章
- ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
Struts2未配置Log4j2.xml报错 Log4j2.xml中的配置 log4j的jar包:log4j-core-2.7.jar log4j2只支持xml和json两种格式的配置,所以配置log ...
- 使用Log4j2,打包后提示ERROR StatusLogger Log4j2 could not find a logging implementation.
从Log4j切换到Log4j2,没有打包之前日志输出正常,但是打包后总是提示下面内容: 错误一: ERROR StatusLogger Log4j2 could not find a logging ...
- ERROR StatusLogger Log4j2 could not find a logging implementation.
今天在学习structs2 2.5.5的版本的时候碰到2个问题.第一个网上下的包里面差log4j-core这个包. 虽然程序可以运行,但控制台会报这个错误. ERROR StatusLogger L ...
- log4j报错ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only err ...
- 测试中出现ERROR StatusLogger No log4j2 configuration file
概述 在hibernate框架搭建完成用log4j2进行测试时,总是出现ERROR StatusLogger No log4j2 configuration file found. Using def ...
- Log4j2报错ERROR StatusLogger Unrecognized format specifier
问题 使用maven-shade-plugin或者maven-assembly-plugin插件把项目打成一个可执行JAR包时,如果你引入了log4j2会出现如下问题: ERROR StatusLog ...
- Log4j2 - Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFileAppender for element RollingFile
问题与分析 在使用Log4j2时,虽然可以正确读取配置文件并生成log文件,但偶然发现控制台打印了异常信息如下: 2018-12-31 17:28:14,282 Log4j2-TF-19-Config ...
- 巨坑npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build/css/add.p
Windows10环境 npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build ...
- Spring Boot ERROR StatusLogger No Log4j 2 configuration file found
1. 问题描述 项目之前的 log4j2 配置没问题,把 pom 文件中的 spring-boot-starter-web 依赖删除后,然后启动项目就报错找不到 log4j2.yml 文件. 之前引用 ...
随机推荐
- 【旧文章搬运】修改PEB,断链隐藏模块成功
原文发表于百度空间,2008-7-26========================================================================== 继续实践之前 ...
- 洛谷 - P2762 - 太空飞行计划问题 - 最小割
https://www.luogu.org/problemnew/solution/P2762 最小割对应的点,在最后一次更新中dinic的bfs会把他的dep重置掉.所以可以根据这个性质复原最小割. ...
- Thrift 使用TNonblockingServer模型时调用PosixThreadFactory出错。
Thrift 使用TNonblockingServer模型时调用PosixThreadFactory出错. 我定位到shared_ptr<PosixThreadFactory> thr ...
- Ecliplse 指定JRE
http://blog.csdn.net/hongweigg/article/details/9987649 在Eclipse启动的过程中,它会去找系统环境变量设置的JRE_HOME或JDK_HOME ...
- 鸟哥私房菜基础篇:安裝 CentOS7.x习题
猫宁!!! 参考链接:http://linux.vbird.org/linux_basic/0157installcentos7.php 鸟哥是为中国信息技术发展做出巨大贡献的人. 1-Linux的目 ...
- Udp实现省略编码
class My_Socket(socket.socket): def __init__(self, encoding='utf-8'): self.encoding = encoding super ...
- CentOS 6.9 --Squid代理服务器
主机名 IP地址 网关 DNS 服务类型 Master eth0:192.168.17.130(VMnet4) eth1:192.168.30.130(NAT) 192.168.30.2 ...
- 关于spring mvc 和struts2的描述与对比
链接:https://www.nowcoder.com/questionTerminal/cf803beb7e3346caa636e4eaa3a8c2e9来源:牛客网 ---------------- ...
- RedHat改yum源免费使用CentOS源
linux默认是安装了yum软件的,但是由于激活认证的原因让redhat无法直接进行yum安装一些软件 如果我们需要在redhat下直接yum安装软件,我们只用把yum的源修改成CentOS的就好了, ...
- 解决Eclipse自动补全变量名的问题
原文地址: https://blog.csdn.net/czh500/article/details/53162157