[MyBatis]问题: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 errors to the console.
错误分析
1)状态记录器没有找到log4j2配置文件,将使用默认配置:只将错误记录到控制台。
2)log4j2的jar包是hibernate5、MyBatis框架自带的log4j2,在SSH、SSM中即使自己导入了第三方日志包,系统依然会调用log4j2,缺省默认配置文件 log4j2.xml
解决方案
- 增加配置文件 log4j2.xml
+ log4j版本:2.9.1
+ 配置文件位置: src/main/resources/log4j2.xml (最终编译后,应放置的位置:/classpath)
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="warn">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%m%n" />
</Console>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>
参考文献
[MyBatis]问题:ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.的更多相关文章
- 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 ...
- ERROR StatusLogger Log4j2 could not find a logging implementation.
今天在学习structs2 2.5.5的版本的时候碰到2个问题.第一个网上下的包里面差log4j-core这个包. 虽然程序可以运行,但控制台会报这个错误. ERROR StatusLogger L ...
- Log4j2报错ERROR StatusLogger Unrecognized format specifier
问题 使用maven-shade-plugin或者maven-assembly-plugin插件把项目打成一个可执行JAR包时,如果你引入了log4j2会出现如下问题: ERROR StatusLog ...
- 使用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. Please add log4j-core to the classpath
问题: ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the ...
- Error: Cannot open main configuration file '//start' for reading! 解决办法
当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...
- springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件
今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误: [2016-05-11 18:25:01,691] [WARN ] ...
- [ERROR] Can't find error-message file '/data/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
1. MySQL5.7.21启动时报错: [ERROR] Can't find error-message file '/data/mysql/3307/share/errmsg.sys'. Chec ...
- [ERROR ] Error parsing configuration file: /etc/salt/minion - conf should be a document, not <type 'str'>.
错误信息 [ERROR ] Error parsing configuration file: /etc/salt/minion - conf should be a document, not &l ...
随机推荐
- 标记一下CF教育场的网址
(因为太难翻了,做到哪里标到哪,自用 Educational Codeforces Round 1 Educational Codeforces Round 2 Educational Codefor ...
- LeetCode刷题感想之BFS
BFS, 顾名思义,广度优先遍历,与DFS对应. 最大的一个区别是,在解题套路里,DFS 多数使用 List<List<Object>> 的方式来保存结果集,并且最后删除回溯的 ...
- Context,多个组件公用的数据传导方法
三个组件:输入A组件 输出B组件 TestContext组件,数据x. 方法: 输入端(A): import TestContext from "TestContext组件路径&qu ...
- CORS(cross origin resource sharing)
1.什么是CORS 定义:跨域资源共享. 2.什么是跨域资源共享 允许浏览器可以从当前源服务器通过ajax访问另外一个源服务地址. 3.同源策略 是浏览器的一个安全功能,不同源的客户端脚本在没有明确的 ...
- 获取gps
package com.example.myapplication;import android.Manifest;import android.annotation.SuppressLint;imp ...
- Testlink for linux by Xampp
Testlink 1.环境: (1)需要的环境配置: ①Linux system. ②Mysql ③apache ④Php (2)上面的2,3,4我们使用简易的Xamppp集成的环境,下面是安装配置x ...
- git—分支设置
什么是分支? 项目以上线,但需要开发新的功能.不能直接在项目上进行开发的,这时候就需要创建一个分支,去完成新功能的开发.测试等.完成之后合并到主分支上面.如果新功能的开发不用分支,导致的问题就会有很多 ...
- lc.59 螺旋矩阵 II
题目描述 给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix . 示例 输入:n = 3 输出:[[1,2,3],[8,9, ...
- python之tk学习,闲鱼搜索-小记
(如想转载,请联系博主或贴上本博地址) 编程,逻辑,总是让人如痴如醉. 下面进入正题. 火热的天气配上火热的python,python的入门友好性让门外汉们都看到了希望.当然自己写的程序如果没有GUI ...
- 单机Linux下搭建MongoDB副本集-三节点
前言说明 Linux下安装MongoDB副本集我基本上是一次搭建,几百年不再碰,也记不住具体的命令,偶尔需要搭建都是直接网上找的教程. 有些教程很精简,有些又版本不一样,所以索性我整合下别人的教程,把 ...