日期:2014-05-17 浏览次数:20659 次
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration> <appender name="console" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out"/> <param name="Threshold" value="DEBUG"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p [%c{2}] %m%n"/> </layout> </appender> <appender name="file" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Append" value="true"/> <param name="Threshold" value="DEBUG"/> <param name="ImmediateFlush" value="true"/> <param name="File" value="log/log.txt"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy-M-d HH:mm:ss} %p %t %c{2} - %m%n"/> </layout> </appender> <appender name="mt" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Append" value="true"/> <param name="Threshold" value="INFO"/> <param name="ImmediateFlush" value="true"/> <param name="File" value="log/mt.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%m%n"/> </layout> </appender> <appender name="mo" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Append" value="true"/> <param name="Threshold" value="INFO"/> <param name="ImmediateFlush" value="true"/> <param name="File" value="log/mo.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%m%n"/> </layout> </appender> <appender name="report" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Append" value="true"/> <param name="Threshold" value="INFO"/> <param name="ImmediateFlush" value="true"/> <param name="File" value="log/report.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%m%n"/> </layout> </appender> <appender name="func" class="org.apache.log4j.DailyRollingFileAppender"> <param name="Append" value="true"/> <param name="Threshold" value="INFO"/> <param name="ImmediateFlush" value="true"/> <param name="File" value="log/func.log"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%m%n"/> </layout> </appender> <!--<appender name="socket" cl