[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 ...
随机推荐
- sql-labs less34--less41
less 34 汉 addslashes() 函数返回在预定义的字符前添加反斜杠的字符串. 预定义字符是: 单引号(') 双引号(") 反斜杠(\) NULL 提示:该函数可用于为存储在数据 ...
- == 和 equal 的区别
== 比较的是两个对象的索引是否相同: equal 比较的是两个对象内容是否相同: int a = 1;long b = 1L;a==b? 答案是 对:因为a和b指向的索引地址相同. 再例如 Stri ...
- matlab解析毫米波雷达bin文件数据 得到复数
来源:TI提供的Mmwave Radar Device ADC Raw Data Capture %%% This script is used to read the binary file pro ...
- PCRaster安装
改了很久才import成功.期间查了不少东西,虽然大部分没用上,但还是记录一下. PCRaster的安装和个人的最终解决方法 Software for environmental modelling ...
- sourcetree 合并某部分代码到另一个分支
1. 在sourceTree中找到需要修改的分支 2. 在显示提交信息中,选择所有分支,这样就会出现soy分支的修改信息 3. 找到需要合并的某次commit, 点击,右键出现弹框 4. 选择 & ...
- 解决Vue打包后背景图片路径错误问题(转)
1.原因解析 当用vue-cli自动构建项目后,有两种运行方法,分别是: npm run dev : 提供一个开发的环境,自动热更新,资源使用绝对路径,所以可以正常看到背景图片. npm run bu ...
- JAVA获取MultipartFile文件的MD5
Java获取文件的MD5,核心都是通过JAVA自带的MessageDigest类来实现. 获取文件MD5值主要分为三个步骤: 第一步获取文件的byte信息, 第二步通过MessageDigest类进行 ...
- go 发布
rm test-serv.bingo build -o test-serv.bin main.go
- ASP.NET Core Web API Swagger 按标签Tags分组排序显示
需求 swagger页面按标签Tags分组显示. 没有打标签Tags的接口,默认归到"未分组". 分组内按接口路径排序 说明 为什么没有使用GroupName对接口进行分组? 暂时 ...
- Insecure Randomness 不安全的随机数
Insecure Randomness Abstract 标准的伪随机数生成器不能抵挡各种加密攻击. Explanation 在对安全性要求较高的环境中,使用一个能产生可预测数值的函数作为随机数据源, ...