<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "../WebRoot/WEB-INF/config/log4j/log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
<!--输出到控制台-->
<appender name="LOG.Console"
class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
<!--滤镜设置输出的级别-->
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="levelMin" value="debug" />
<param name="levelMax" value="fatal" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<!--将级别为INFO的信息输出到文件-->
<appender name="LOG.INFO"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="D:/hosting/wwwroot/rmtitems_com/htdocs/WEB-INF/logfile/info.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="5120KB" />
<param name="MaxBackupIndex" value="1000" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy/MM/dd HH:mm:ss} - %-5p -%c %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="info" />
<param name="LevelMax" value="info" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<!--将级别为WARN的信息输出到文件-->
<appender name="LOG.WARN"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="D:/hosting/wwwroot/rmtitems_com/htdocs/WEB-INF/logfile/warn.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="5120KB" />
<param name="MaxBackupIndex" value="1000" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy/MM/dd HH:mm:ss} - %-5p -%c %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="warn" />
<param name="LevelMax" value="warn" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<!--将级别为ERROR的信息输出到文件-->
<appender name="LOG.ERROR"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="D:/hosting/wwwroot/rmtitems_com/htdocs/WEB-INF/logfile/error.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="5120KB" />
<param name="MaxBackupIndex" value="1000" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy/MM/dd HH:mm:ss} - %-5p -%c %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="error" />
<param name="LevelMax" value="error" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<!--将级别为FATAL的信息输出到文件-->
<appender name="LOG.FATAL"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="D:/hosting/wwwroot/rmtitems_com/htdocs/WEB-INF/logfile/fatal.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="5120KB" />
<param name="MaxBackupIndex" value="1000" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy/MM/dd HH:mm:ss} - %-5p -%c %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="fatal" />
<param name="LevelMax" value="fatal" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<!--将级别为DEBUG的信息输出到文件-->
<appender name="LOG.DEBUG"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="D:/hosting/wwwroot/rmtitems_com/htdocs/WEB-INF/logfile/debug.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="5120KB" />
<param name="MaxBackupIndex" value="1000" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy/MM/dd HH:mm:ss} - %-5p -%c %m%n" />
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="debug" />
<param name="LevelMax" value="debug" />
<param name="AcceptOnMatch" value="true" />
</filter>
</appender>
<root>
<priority value="debug" />
<appender-ref ref="LOG.Console" />
<appender-ref ref="LOG.INFO" />
<appender-ref ref="LOG.WARN" />
<appender-ref ref="LOG.ERROR" />
<appender-ref ref="LOG.FATAL" />
<appender-ref ref="LOG.DEBUG" />
</root>
</log4j:configuration>