All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alipay.sofa.thread.log.log4j.log-conf.xml Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE log4j:configuration SYSTEM "http://toolkit.alibaba-inc.com/dtd/log4j/log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="WARN-APPENDER" class="org.apache.log4j.DailyRollingFileAppender">
        <param name="file" value="${logging.path}/sofa-thread/aberrant-digest.log"/>
        <param name="append" value="true"/>
        <param name="encoding" value="${file.encoding}"/>
        <param name="threshold" value="warn"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p %-5t - %m%n"/>
        </layout>
    </appender>

    <appender name="SOFA-APPENDER" class="org.apache.log4j.DailyRollingFileAppender">
        <param name="file" value="${logging.path}/sofa-thread/thread-digest.log"/>
        <param name="append" value="true"/>
        <param name="encoding" value="${file.encoding}"/>
        <param name="threshold" value="${logging.level.com.alipay.sofa.thread}"/>
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p %-5t - %m%n"/>
        </layout>
    </appender>

    <logger name="com.alipay.sofa.thread" additivity="false">
        <level value="${logging.level.com.alipay.sofa.thread}"/>
        <appender-ref ref="SOFA-APPENDER"/>
    </logger>

    <logger name="com.alipay.sofa.thread.warn" additivity="false">
        <level value="warn"/>
        <appender-ref ref="WARN-APPENDER"/>
    </logger>

    <root>
        <level value="${logging.level.com.alipay.sofa.thread}"/>
        <appender-ref ref="SOFA-APPENDER"/>
        <appender-ref ref="WARN-APPENDER"/>
    </root>
</log4j:configuration>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy