log4j.xm 加载顺序 不按格式竟会警告

log4j:WARN Continuable parsing error 92 and column 23

log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,appender*,(category|logger)*,root?,categoryFactory?)".

造成这个警告的原因是log4j.xml的配置文件书写顺序问题

解决方法是按照以下顺序书写。。

<renderer></renderer>

<renderer></renderer>

<renderer></renderer>

<appender></appender>

<appender></appender>

<appender></appender>

<plugin></plugin>

<plugin></plugin>

<plugin></plugin>

<logger></logger>

<logger></logger>

<logger></logger>

<category></category>

<category></category>

<category></category>

<root></root>

<root></root>

<root></root>

<loggerfactory></loggerfactory>

<loggerfactory></loggerfactory>

<loggerfactory></loggerfactory>

<categoryfactory></categoryfactory>

<categoryfactory></categoryfactory>

<categoryfactory></categoryfactory>

相关推荐