ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.

log4j版本:log4j-core-2.7.jar   log4j-api-2.7.jar

log4j2只支持xml和json两种格式的配置,所以配置log4j.properties时,是没有作用的。

log4j 2.0与以往的1.x有一个明显的不同,其配置文件只能采用.xml, .json或者 .jsn。在默认情况下,系统选择configuration文件的优先级如下:(classpath为scr文件夹)

  1. classpath下名为 log4j-test.json 或者log4j-test.jsn文件
  2. classpath下名为 log4j2-test.xml
  3. classpath下名为 log4j.json 或者log4j.jsn文件
  4. classpath下名为 log4j2.xml

log4j报错ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.的更多相关文章

  1. Log4j2报错ERROR StatusLogger Unrecognized format specifier

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

  2. Android Studio报错Error:Failed to open zip file. Gradle's dependency cache may be corrupt

    Android Studio导入项目后,Gradle编译失败,报错如下. Error:Failed to open zip file. Gradle's dependency cache may be ...

  3. WebViewer报错Error loading document: Invalid XOD file: Zip end header data is wrong size!

    错误:Error loading document: Invalid XOD file: Zip end header data is wrong size! 解决:https://groups.go ...

  4. pip install urllib3[secure] 报错 error: ffi.h: No such file or directory

    解决 sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging pyt ...

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

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

  6. 【IntellJ IDEA】idea启动测试类报错Error running 'Test1.test': Command line is too long. Shorten command line for Test1.test or also for JUnit default configuration.

    idea启动测试类报错 Error running 'Test1.test': Command line is too long. Shorten command line for Test1.tes ...

  7. php源码安装执行configure报错error: off_t undefined; check your library configuration

    php安装执行configure报错error: off_t undefined; check your library configuration vim /etc/ld.so.conf 添加如下几 ...

  8. redis集群报错:(error) CLUSTERDOWN Hash slot not served

    百度上坑太多,如果你遇到搭建redis集群的时候出现这个错误在百度上找到解决办法基本上都是坑. 首先集群搭建完成后,你肯定去登陆redis进行测试 1.redis01/redis-cli -h &qu ...

  9. Docker 报错 error during connect: Get pipe/docker_engine: The system cannot find the file specified. - 摘要: 本文讲的是Docker 报错 error during connect: Get pipe/dock

    error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/version: open //./pipe/docker_ ...

随机推荐

  1. Python读取文件数据

    1题目要求: 文本文件有这些数据,需要的只有其中的5个属性,如下颜色标记 像以下的数据达到75万组: 1product/productId: B0000UIXZ4 2product/title: Ti ...

  2. iptables基础及samba配置举例

    iptable基本概念 iptables防火墙包含两部分,即位于用户空间的iptables模块和位于内核空间netfilter模块.用户空间模块提供插入.修改和除去包过滤表中规则,内核模块进行实际的过 ...

  3. ASIHTTPRequest-Cookie的使用

    本文转载至 http://www.cocoachina.com/bbs/read.php?tid=93220&page=e&#a     持久化cookie ASIHTTPReques ...

  4. 逻辑英语 第四季 Speaking and Listening

    1. 发音的变革 背字典:牛津双解/朗文英汉 a. 如何一分钟变伦敦腔 发音有两种:伦敦腔/其他 生理分析: ① 后置发音:瞬间华丽变声第一步 东方人靠嘴巴发音: 西方人用胸腔发音[有共鸣] 方法1: ...

  5. 九度OJ 1256:找出两个只出现了一次的数字 (位运算)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:568 解决:186 题目描述: 一个整型数组里除了两个数字之外,其他的数字都出现了两次.请写程序找出这两个只出现一次的数字. 输入: 输入的 ...

  6. 核函数 深度学习 统计学习 强化学习 神经网络 xx

  7. 【python】-- 基本语法、循环

    数据类型 1.数字: int(整型) 在32位机器上,整数的位数为32位,取值范围为-2**31-2**31-1,即-2147483648-2147483647 在64位系统上,整数的位数为64位,取 ...

  8. 我的Android进阶之旅------>Android关于Log的一个简单封装

    android.util.Log类,可以方便地用于在编码调试过程中打印日志.但是在发布后的产品中,如果有太多的日志打印,则会严重地影响性能.对android.util.Log类做一个简单的封装,当产品 ...

  9. JVM虚拟机调参

    一.堆大小设置JVM 中最大堆大小有三方面限制:相关操作系统的数据模型(32-bt还是64-bit)限制:系统的可用虚拟内存限制:系统的可用物理内存限制.32位系统下,一般限制在1.5G~2G:64为 ...

  10. c语言操作mysql数据库

    c语言操作Mysql数据库,主要就是为了实现对数据库的增.删.改.查等操作,操作之前,得先连接数据库啊,而连接数据库主要有两种方法.一.使用mysql本身提供的API,在mysql的安装目录中可可以看 ...