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 文件. 之前引用 ...
随机推荐
- 6-10 SVM支持向量机1
都是特征加上分类器.还将为大家介绍如何对这个数据进行训练.如何训练得到这样一组数据. 其实SVM支持向量机,它的本质仍然是一个分类器.既然是一个分类器,它就具有分类的功能.我们可以使用一条直线来完成分 ...
- View Controller Programming Guide for iOS---(二)---View Controller Basics
View Controller Basics Apps running on iOS–based devices have a limited amount of screen space for d ...
- 洛谷 - P1426 - 小鱼会有危险吗 - 模拟
https://www.luogu.org/problemnew/show/P1426 题目说的是小鱼进入探测器一秒后就会有危险,所以不应该让小鱼先游,而是先检测探测器. #include<bi ...
- POJ2367【拓扑排序】
很裸的拓扑排序~ //#include <bits/stdc++.h> #include<iostream> #include<string.h> #include ...
- 转载文章 -- 难搞的滚动事件(滚动默认,scrollTop)
关于取消默认事件 现今的 chrome 浏览器,为了实现丝滑顺畅地滑动,活动时间直接执行而不再检测默认事件,这使得无法用 e.preventDafult() 来阻止默认事件. 现在需要添加 {pass ...
- NOIp 2014 解方程 【数学/秦九韶算法/大数取膜】By cellur925
题目传送门 题意:求高次方程的解及其个数.其中 1° 我们知道,高次方程是没有求根公式的.但是利用逆向思维,我们可以进行“试根法”,因为题目中给出了所求根的范围.但是多项式系数过于吓人,达到了sxbk ...
- shiro之自定义realm
Shiro认证过程 创建SecurityManager--->主体提交认证--->SecurityManager认证--->Authenticsto认证--->Realm验证 ...
- Appium安装说明
1.安装Appium前,需要先安装node.js .node.js官方网站:https://nodejs.org/, 这里我以Windows 10为例进行安装,选择Windows installer( ...
- php连接mysql并读取数据
<?php $server_name="localhost:3306"; //数据库服务器名称 $username="root"; // 连接数据库用户名 ...
- HDU6446(树上、排列的贡献计算)
关键点在于:全排列中,任意两点u.v相邻的次数一定是(n - 1)! * 2次,即一个常数(可以由高中数学知识计算,将这两个点捏一起然后全排列然后乘二:或者用n! / C(2, n)). 这之后就好算 ...