Logging system failed to initialize using configuration from ‘classpath:log4j2.xml‘

2023-05-16

报错:

Logging system failed to initialize using configuration from 'classpath:log4j2.xml'

方法一:

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

方法二:需要把web包放到pom文件中的第一位

 		<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Logging system failed to initialize using configuration from ‘classpath:log4j2.xml‘ 的相关文章

  • Node.js - 日志记录/使用摩根和温斯顿

    we use morgan为了注销快速转换 var morgan require morgan morgan combined a format string morgan remote addr method url uuid a cus
  • 使用Python logger类为不同的日志级别生成多个日志

    我在这里浏览了 python 日志记录类的教程 没有看到任何可以让我为同一输出创建不同级别的多个日志的内容 最后我想要三个日志
  • 从代码中使用 XML 配置 log4net 或 NLog

    最近我一直在从事一个项目 除其他外 我们希望提供一个集中式配置系统 我们使用 WCF Silverlight C 等来创建分布式服务和客户端系统 我们想要配置的事情之一是日志记录 显然 我们可以通过 app config 或单独的日志配置文
  • 将文件夹名称添加到输出 Pig Latin

    我在 HDFS 中有下一个目录结构 logs folder 2021 03 01 log1 log2 log3 2021 03 02 log1 log2 2021 03 03 log1 log2 日志由文本数据组成 数据中没有日期 因为它已
  • 登录 Scala

    在 Java 中 日志记录的标准习惯用法是为记录器对象创建一个静态变量 并在各种方法中使用它 在 Scala 中 习惯用法似乎是使用 logger 成员创建 Logging 特征 并将该特征混合到具体类中 这意味着每次创建对象时 它都会调用
  • 如何读取iPhone设备控制台的内容?

    当设备通过 Xcode 插入我的机器时 我可以读取控制台 我需要构建一种方式来读取控制台 以便测试用户从设备获取控制台输出消息和崩溃报告 然后通过电子邮件对话框向其发送电子邮件 iOS 上是否存在控制台日志和崩溃报告所在的标准文件位置 控制
  • Powershell计划任务冲突?

    我已安排两个 powershell 脚本作为任务在 00 00 运行 今天早上我检查了事件日志 发现其中一个脚本失败 出现以下异常 失败 错误是 未能 在以下位置创建日志条目 C Users SPSETU 1 AppData Local T
  • Gunicorn 日志配置 access_log_format

    我希望 Gunicorn 在我的 docker 容器中记录 JSON 我想在配置文件中使用 access logformat 尝试添加format or access log format or access logformat不配置记录器
  • Log4j2 错误处理

    由于我发现 log4j 1 2 x 存在一些性能问题 因此我尝试迁移到 log4j2 现在我遇到了一个问题 我找不到解决方案 我必须将 log4j 1 2 x 的配置文件重写为 v2 兼容文件 当我到达附加程序内部的属性 称为 errorH
  • 如何在 log4j 中启用包级别日志记录

    谁能告诉我 log4j 中的包级别日志记录是什么 以及如何实现这一点 今天我的面试问题无法回答 即使我在谷歌中也没有找到好的解决方案 太感谢了 包级别日志记录是 log4j 的标准日志记录 使用 log4j 配置 您可以指定包和关联的级别
  • NLog 的线程安全性如何?

    Well 我等了好几天才决定发布这个问题 因为我不知道如何陈述这一点 结果写了一篇很长的详细帖子 不过 我认为此时向社区寻求帮助是有意义的 基本上 我尝试使用 NLog 为数百个线程配置记录器 我认为这会非常简单 但几十秒后我得到了这个异常
  • WCF:如何跟踪消息正文?

    我正在尝试诊断在相对简单的服务主机进程 Service exe 中自托管的 WCF 服务 我已这样配置 Service exe config
  • java.util.logging.Logger 不尊重 java.util.logging.Level?

    在普通 Java SE 6 环境中 Logger l Logger getLogger nameless l setLevel Level ALL l fine somemessage Eclipse 控制台中没有显示任何内容 l info
  • 如何为 Azure 上的 Node.js Api 应用程序启用 BLOB 日志记录?

    我在 azure 上有一个 node js api 应用程序 我用bunyan将每个请求记录到sdtout 如何保存和读取日志文件 我启用了 BLOB 日志记录 我的存储中唯一显示的是一堆 csv 文件 这是一个例子 date level
  • 使用 doctest 并登录 python 程序

    usr bin python2 4 import logging import sys import doctest def foo x gt gt gt foo 0 0 print d x logger debug d x def tes
  • 惰性记录器消息字符串评估

    我在 python 应用程序中使用标准 python 日志记录模块 import logging logging basicConfig level logging INFO logger logging getLogger log whi
  • 应用程序日志保存在哪里? [复制]

    这个问题在这里已经有答案了 可能的重复 Windows 上应用程序日志文件的存储位置 https stackoverflow com questions 1572934 where to store an application log f
  • 如何编写具有 cout 样式接口的记录器类 (logger << "Error: " << val << endl;)

    我想创建一个记录器类 具有如下功能 Logger log log lt lt Error lt lt value lt lt seen lt lt endl 这应该打印一条自定义格式的消息 例如 2009 年 9 月 12 日 11 22
  • Log4J 配置不显示 JBoss AS7 中的 Spring Transaction 和其他日志

    以下是我的 log4j properties log4j rootLogger ALL stdout log4j appender stdout org apache log4j ConsoleAppender log4j appender
  • 在 Ruby 中获取 system() 调用的输出

    如果我使用调用命令内核 系统 http ruby doc org core 2 2 0 Kernel html method i system在 Ruby 中 如何获取其输出 system ls 我想扩展和澄清混沌的答案 https sta

随机推荐