Struts2未配置Log4j2.xml报错

Log4j2.xml中的配置

log4j的jar包:log4j-core-2.7.jar

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

参考文档:

1):https://blog.csdn.net/weixin_40135537/article/details/78936054

2):https://www.cnblogs.com/hafiz/p/6170702.html

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...的更多相关文章

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

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

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

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

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

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

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

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

  6. Log4j2报错ERROR StatusLogger Unrecognized format specifier

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

  7. Log4j2 - Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFileAppender for element RollingFile

    问题与分析 在使用Log4j2时,虽然可以正确读取配置文件并生成log文件,但偶然发现控制台打印了异常信息如下: 2018-12-31 17:28:14,282 Log4j2-TF-19-Config ...

  8. 巨坑npm run dev 报错 终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build/css/add.p

    Windows10环境 npm run dev 报错  终于找到正确答案 Error: EPERM: operation not permitted, open '/data/public/build ...

  9. Spring Boot ERROR StatusLogger No Log4j 2 configuration file found

    1. 问题描述 项目之前的 log4j2 配置没问题,把 pom 文件中的 spring-boot-starter-web 依赖删除后,然后启动项目就报错找不到 log4j2.yml 文件. 之前引用 ...

随机推荐

  1. 常见sql for oracle

    select to_char(current_timestamp,'yyyy-mm-dd hh24:mi:ss.ff3'),to_char(sysdate,'yyyy-mm-dd hh24:mi:ss ...

  2. Python鸭子类型思想

    动态语言中经常提到鸭子类型,所谓鸭子类型就是:如果走起路来像鸭子,叫起来也像鸭子,那么它就是鸭子(If it walks like a duck and quacks like a duck, it ...

  3. Java IO之字符流

    public static void main(String[] args) { FileWriter fw = null; try { fw = new FileWriter("/User ...

  4. jQuery链式调用

    <script> var arr = function(){ return new arr.prototype.init(); } arr.prototype.init = functio ...

  5. php文件上传代码解析

    php文件上传代码解析 is_uploaded_file()  //函数判断指定的文件是否是通过 HTTP POST 上传的,返回一个布尔值. $_FILES['upfile']['tmp_name' ...

  6. java thrift返回List异常

    对于下段代码: public List<String> hmget(String key, List<String> fields) throws org.apache.thr ...

  7. C++和Python混合编程

    为何人工智能(AI)首选Python?读完这篇文章你就知道了:https://blog.csdn.net/qq_41769259/article/details/79419322 C++调用Pytho ...

  8. Spring组件扫描 <context:component-scan/>

    目录(?)[-] 总结 使用方式 扫描controller下所以类 扫描符合条件Controller的类推荐 我们在SpringMVC开发项目中,有的用注解和XML配置Bean,这两种都各有自己的优势 ...

  9. 好用的SHELL小编程

    1>判断输入为数字,字符或其他      脚本代码:      检测结果:   2>求平均数:   测试效果:     3>自减输出: 脚本代码: 测试效果:    4>在文件 ...

  10. accumarray

    Example Create a -by- vector and sum values -D subscripts: val = :; subs = [; ; ; ; ] subs = A = acc ...