1
我的log4j.xml如下所示,但它記錄了錯誤級別的消息。你能幫我找出問題當設置爲INFO時,log4j日誌級別爲ERROR級別
<appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} ::%-5p::[%c:%L]::[%t]::%m%n" />
</layout>
</appender>
<appender name="FileAppender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="d:\Log\test.log"/>
<param name="Append" value="true"/>
<param name="Threshold" value="INFO"/>
<param name="DatePattern" value="'.'yyyy-MM"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} ::%-5p::[[%c:%L]::[%t]::%m%n"/>
</layout>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="FileAppender"/>
</root>
你的意思是? – 2011-03-29 15:17:11
@Heiko yup。謝謝 – 2011-03-29 15:25:03