将我的war文件部署到tomcat时出现错误:
log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,throwableRenderer?,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)"
我四处搜索,发现我的 log4j.xml 的排序可能是错误的,但它应该是正确的。
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p %d %c %x - %m%n"/>
</layout>
</appender>
<root>
<priority value ="error" />
<appender-ref ref="console" />
</root>
<category name="org.springframework" additivity="false">
<priority value="info" />
<appender-ref ref="console" />
</category>
</log4j:configuration>
有什么建议么?