扩展 log4j2.xml 并在其变得非常长时进行拆分。

huangapple 未分类评论50阅读模式
英文:

extend log4j2.xml and split it when it become very long

问题

My log4j2.xml file becomes very lengthy, so I want to open a new XML file to add the appenders I want.

I tried

<import resource="log4j2_2.xml"/>

inside the Configuration tag, but it does not work.
Any ideas?

英文:

My log4j2.xml file becomes very lenghthy so I want to open a new xml file to add the appenders I want,

I tried

&lt;import resource=&quot;log4j2_2.xml&quot;/&gt;

inside the Configuration tag but it does not work
any ideas?

答案1

得分: 0

您可以创建多个配置文件,并通过将它们作为逗号分隔的列表指定在Log4J.configurationFile属性中来合并它们。

英文:

You can create multiple configuration files and merge the by specifying them as a comma separated list in the Log4J.configurationFile property.

huangapple
  • 本文由 发表于 2020年5月3日 13:01:48
  • 转载请务必保留本文链接:https://java.coder-hub.com/61569840.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定