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 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
时间: 2024-12-24 11:39:13

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

Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging

在做struts2时导包完成发现Struts2 ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging log4j2的配置文件没找到去struts2-blank下.WEB-INF\classes下找到log4j的配置文件log4j2.xml:把他放入src中

测试错误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. 错误:状态记录器没有找到log4j2配置文件,将使用默认配置:只将错误记录到控制台. 原因:log4j2的jar包是hibernate5框架自带的log4j2,在ssh中即使自己导入了第三方日志包,系统依然会调用log4j2,缺省默认配置文件 log4j2.x

Log4j2报错ERROR StatusLogger Unrecognized format specifier

问题 使用maven-shade-plugin或者maven-assembly-plugin插件把项目打成一个可执行JAR包时,如果你引入了log4j2会出现如下问题: ERROR StatusLogger Unrecognized format specifier [d] ERROR StatusLogger Unrecognized conversion specifier [d] starting at position 16 in conversion pattern. ERROR St

【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.test or also for JUnit default configuration. 注意: 最简单的方法,就是你重新创建一个新的测试类,在里面重新写一遍测试方法,代码都可以粘贴过去. 解决方法: 1.打开本项目的.idea文件夹,找到文件夹中的workspace.xml文件 2.搜索 Proper

springboot启动报错:"Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled."

报错内容 java.lang.Object.wait(Native Method)java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:41)2019-02-14 14:58:00.326 INFO 17688 --- [ main] Condition

git push报错error: failed to push some refs to '[email protected]:

$ git push -u origin master To [email protected]:xxx/xxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:xxx/xxx.git' hint: Updates were rejected because the remote contains work that you do hint:

Mysql多实例进入db报错ERROR 2002

今天做了mysql多实例实验, 进入3307没问题 进入3306: 进入: mysql -S /data/3306/mysql.sock报错: ERROR 2002 (HY000):Can't connect to local MySQL server 解决: 1. kill 33934 kill 34228 2, 我把启动脚本mysql中的密码去掉了 我把启动脚本mysql 统统chmod +x处理(之前是700) 3,重启 mysqld_safe --defaults-file=/data/

安装MySQL-python报错error: command 'gcc' failed with exit status 1

[[email protected] MySQL-python-1.2.3]# python setup.py install function) .... _mysql.c:133: error: 'ER_SYNTAX_ERROR' undeclared (first use in this function) _mysql.c:380: error: '_mysql_ConnectionObject' has no member named 'connection' _mysql.c:382

真机测试报错ERROR/AndroidRuntime: java.lang.RuntimeException: setParameters failed解决办法

这个错误是和调用相机摄像头相关的. 产生这个错误的原因主要在于代码控制分辨率的显示和真机测试分辨率不一样. 一:解决办法 WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); Camera.Parameters parameters = camera.getParameters();// 得到摄像头的参数 para