java程序员-http://www.it-ebooks.info/

年轻的我,脚踩大地,仰望天空,路还很长....

博客园 首页 新随笔 联系 订阅 管理

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

<appender name="LOG-ALL" class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="file" value="${logpath}/all.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m \n"/>
</layout>
</appender>

<appender name="LOG-CONFIG" class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="file" value="${logpath}/config.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m \n"/>
</layout>
</appender>

<category name="com.vh.app.server.vgb.controller.config" additivity="false">
<priority value="${loglevel}" />
<appender-ref ref="LOG-CONFIG" />
</category>

<appender name="LOG-MONITOR" class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="file" value="${logpath}/monitor.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m \n"/>
</layout>
</appender>

<category name="com.vh.app.server.vgb.check" additivity="false">
<priority value="${loglevel}" />
<appender-ref ref="LOG-MONITOR" />
</category>

<appender name="LOG-WORKFLOW" class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="file" value="${logpath}/workflow.log"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}] %6p - %30.30c - %m \n"/>
</layout>
</appender>

<category name="com.vh.app.server.vgb.service.flow" additivity="false">
<priority value="${loglevel}" />
<appender-ref ref="LOG-WORKFLOW" />
</category>

<root>
<priority value="${loglevel}"/>
<appender-ref ref="LOG-ALL"/>
</root>
</log4j:configuration>

posted on 2016-10-19 11:06  gstsyyb  阅读(145)  评论(0编辑  收藏  举报