<?xml version="1.0" encoding="GB2312"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- ===================================================================== -->
<!-- 以下是appender的定义 -->
<!-- ===================================================================== -->
<appender name="PROJECT-CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="POOL" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/pool.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="PROJECT" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/project.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="ROOT" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/root.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="reportAppender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/report.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="ROUTER" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/router.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="NET" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/net.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<appender name="HANDLER" class="org.apache.log4j.DailyRollingFileAppender">
<param name="file" value="${amoeba.home}/logs/messageHandle.log"/>
<param name="append" value="true"/>
<param name="encoding" value="GBK"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d %-5p %c{2} - %m%n"/>
</layout>
</appender>
<logger name="report" additivity="true">
<level value="info"/>
<appender-ref ref="reportAppender"/>
</logger>
<logger name="com.meidusa.amoeba.net" additivity="true">
<level value="warn"/>
<appender-ref ref="NET"/>
</logger>
<logger name="com.meidusa.toolkit.net" additivity="true">
<level value="warn"/>
<appender-ref ref="NET"/>
</logger>
<logger name="com.meidusa.amoeba.mysql.net" additivity="true">
<level value="warn"/>
<appender-ref ref="NET"/>
</logger>
<logger name="com.meidusa.toolkit.net.ServerableConnectionManager" additivity="true">
<level value="warn"/>
<appender-ref ref="PROJECT"/>
<!-- for debug -->
<appender-ref ref="PROJECT-CONSOLE"/>
</logger>
<logger name="com.meidusa.amoeba.mysql.context.MysqlRuntimeContext" additivity="true">
<level value="warn"/>
<appender-ref ref="PROJECT"/>
<!-- for debug -->
<appender-ref ref="PROJECT-CONSOLE"/>
</logger>
<logger name="com.meidusa.amoeba.route" additivity="true">
<level value="warn"/>
<appender-ref ref="ROUTER"/>
</logger>
<logger name="com.meidusa.amoeba.parser.statement" additivity="true">
<level value="warn"/>
<appender-ref ref="PROJECT"/>
</logger>
<logger name="com.meidusa.amoeba.mysql.handler" additivity="true">
<level value="error"/>
<appender-ref ref="HANDLER"/>
</logger>
<logger name="com.meidusa.toolkit.common.poolable" additivity="true">
<level value="warn"/>
<appender-ref ref="POOL"/>
</logger>
<logger name="com.meidusa.toolkit.common.heartbeat" additivity="true">
<level value="warn"/>
<appender-ref ref="POOL"/>
</logger>
<logger name="com.meidusa.amoeba.mysql.server" additivity="true">
<level value="info"/>
<appender-ref ref="PROJECT"/>
</logger>
<!-- ===================================================================== -->
<!-- Root logger的定义 -->
<!-- ===================================================================== -->
<root>
<level value="warn"/>
<appender-ref ref="ROOT"/>
</root>
</log4j:configuration>