错误信息

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.的更多相关文章

  1. 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 ...

  2. 测试中出现ERROR StatusLogger No log4j2 configuration file

    概述 在hibernate框架搭建完成用log4j2进行测试时,总是出现ERROR StatusLogger No log4j2 configuration file found. Using def ...

  3. ERROR StatusLogger Log4j2 could not find a logging implementation.

    今天在学习structs2  2.5.5的版本的时候碰到2个问题.第一个网上下的包里面差log4j-core这个包. 虽然程序可以运行,但控制台会报这个错误. ERROR StatusLogger L ...

  4. Log4j2报错ERROR StatusLogger Unrecognized format specifier

    问题 使用maven-shade-plugin或者maven-assembly-plugin插件把项目打成一个可执行JAR包时,如果你引入了log4j2会出现如下问题: ERROR StatusLog ...

  5. 使用Log4j2,打包后提示ERROR StatusLogger Log4j2 could not find a logging implementation.

    从Log4j切换到Log4j2,没有打包之前日志输出正常,但是打包后总是提示下面内容: 错误一: ERROR StatusLogger Log4j2 could not find a logging ...

  6. 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 ...

  7. Error: Cannot open main configuration file '//start' for reading! 解决办法

    当执行service nagios start启动nagios时,报错:Error: Cannot open main configuration file '//start' for reading ...

  8. springMVC+mybatis 进行单元测试时 main SqlSessionFactoryBean - Parsed configuration file: 'class path resource' 无限的读取xml文件

    今天终于写完的Dao层的操作,怀着无比激动的心情,进行单元测试,就在最后一个方法,对的就是最后一个方法,启动单元测试就会报以下错误: [2016-05-11 18:25:01,691] [WARN ] ...

  9. [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 ...

  10. [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 ...

随机推荐

  1. xShell执行js脚本

    var CMD = 'ls'; var INTERVAL = 1; var MAX = 5; var CR = String.fromCharCode(13); var LF = String.fro ...

  2. 格式化 ceph osd 盘报错stderr: wipefs: error: /dev/sdc: probing initialization failed: Device or resource busy

    1.格式化 ceph集群osd盘 出现设备繁忙,只能手动清空磁盘并重启 格式化:ceph-volume lvm zap /dev/sdc dd 手动清空磁盘:dd if=/dev/zero of=/d ...

  3. [CQOI2014]通配符匹配 题解

    第一眼:什么鬼东西ヾ(。`Д´。) 第二眼:显然,这道题要分段处理 类似[TJOI2018]碱基序列\ (建议做一做也是Hash+DP)\ 那你怎么第一眼没看出来 Hash处理+DP==AC 直接上代 ...

  4. Ajax属性

    如何创建一个 Ajax <script>         window.onload=function(){             1)创建一个异步调用对象             va ...

  5. Hadoop之HDFS优缺点、设计原理、框架

    如需大数据开发整套视频(hadoop\hive\hbase\flume\sqoop\kafka\zookeeper\presto\spark):请联系QQ:1974983704  Hadoop的前世今 ...

  6. Expression及Equal Demo

    代码参考1: using System; using System.Linq.Expressions; namespace ExpressionDemo { class People { public ...

  7. 助教工作总结(高级语言程序设计C语言)

    * { font-family: 宋体 } zw { font-size: 20px; line-height: 2em } 一.助教工作的具体职责和任务   在本学期担任陈欣老师的计科专业21级c语 ...

  8. 解决VUE中document.documentElement.scrollTop为0(转)

    原文地址:https://blog.csdn.net/WDCCSDN/article/details/82107374 Vue中document.documentElement.scrollTop的值 ...

  9. 代码片断:GDI绘制带一定角度的椭圆

    //先将DXF文件中的Ellipse 解析到elpList 中 foreach (Ellipse ellipse in elpList) { //定义一个矩形 RectangleF rect = ne ...

  10. 安装mysql8.0

    安装repo源 参考mysql官方文档 参考文章 redhat7通过yum安装mysql5.7.17教程:https://www.jb51.net/article/103676.htm mysql r ...