我在jboss eap 6的java应用程序中使用log4j,我已使用以下配置配置log4j.xml
。
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="null" threshold="null">
<appender name="INFO_FILE" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="mypath/myLogs.log"/>
<param name="DatePattern" value="'.'MM-dd-yy"/>
<layout class="class path here">
<param name="ConversionPattern" value="%d{ISO8601} %c{2} %m%n"/>
</layout>
</appender>
<category>
<priority value="OFF" />
</category>
<root>
<level value="INFO" />
<appender-ref ref="INFO_FILE"/>
</root>
</log4j:configuration>
但我在日志语句中遇到错误
stderr log4j:WARN Attribute "name" is required and must be specified for element type "category".