英文:
Convert <log4j:configuration> (in log4j 1.x) to <Configuration> (in log4j 2.x)
问题
我需要将log4j 1.x的XML配置迁移到log4j 2.x配置XML。我找不到一些log4j1配置属性的log4j2等效配置。我在log4j1 XML中有以下行:
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" threshold="trace" reset="true" debug="false">
我想要一个等效的log4j2配置,类似于:
<Configuration>
我知道status="debug"
会启用log4j2内部的详尽日志记录。但默认情况下它是关闭的,正如我所需要的那样。有人能建议log4j2 XML中threshold="trace"
和reset="true"
的等效配置吗?
英文:
I need to migrate log4j 1.x XML configuration to log4j 2.x configuration XML. I couldn't find log4j2 equivalent configurations to some of the log4j1 configuration attributes. I have following line in log4j1 XML:
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" threshold="trace" reset="true" debug="false">
I want to have an equivalent log4j2 configuration, something like:
<Configuration>
I know status="debug"
would enable extensive logging of log4j2 internals. But by default it is turned off as I need. Could anyone suggest the equivalent configurations for threshold="trace"
and reset="true"
in log4j2 XML?
答案1
得分: 1
Log4j2不支持这两个属性。
英文:
Log4j2 does not support either of those attributes.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论