<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>

    <appender name="console" class="org.apache.log4j.ConsoleAppender">
        <param name="Threshold" value="WARN"/>
        <layout class="org.apache.log4j.EnhancedPatternLayout">
            <!-- %L(line number) option is extremely slow. -->
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-35.35c{1.}) %m%n"/>
        </layout>
    </appender>

    <appender name="dailyRollingFile" class="org.apache.log4j.DailyRollingFileAppender">
        <param name="file" value="${pinpoint.log}/${pinpoint.agentId}-pinpoint.log"/>
        <param name="Append" value="true"/>
        <param name="DatePattern" value="'.'yyyy-MM-dd"/>

        <layout class="org.apache.log4j.EnhancedPatternLayout">
            <!-- %L(line number) option is extremely slow. -->
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-35.35c{1.}) %m%n"/>
        </layout>
    </appender>

    <appender name="rollingFile" class="org.apache.log4j.RollingFileAppender">
        <param name="file" value="${pinpoint.log}/${pinpoint.agentId}-pinpoint.log"/>
        <param name="append" value="true"/>
        <param name="maxFileSize" value="10MB"/>
        <param name="maxBackupIndex" value="20"/>
        <layout class="org.apache.log4j.EnhancedPatternLayout">
            <!-- %L(line number) option is extremely slow. -->
            <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%-5p](%-35.35c{1.}) %m%n"/>
        </layout>
    </appender>

    <logger name="com.navercorp.pinpoint" additivity="false">
        <level value="INFO"/>
        <appender-ref ref="console"/>
        <appender-ref ref="rollingFile"/>
    </logger>

    <root>
        <level value="INFO"/>
        <appender-ref ref="rollingFile"/>
    </root>
</log4j:configuration>