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

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

    <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d %-5p %c (%M:%L) [%t] - %m%n"/>
        </layout>
    </appender>

       <appender name="FILE_APPENDER" class="org.apache.log4j.DailyRollingFileAppender">
            <param name="File" value="${catalina.home}/dLinkLogs/info.log"/>
            <param name="DatePattern"    value="'.'yyyy-MM-dd"/>
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d %-5p %c (%M:%L) [%t] - %m%n"/>
            </layout>
        </appender>

      <appender name="TrackerAppender" class="org.apache.log4j.DailyRollingFileAppender">
            <param name="File" value="${catalina.home}/dLinkLogs/error.log"/>
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value="%d %p %c (%M:%L) [%t] - %m%n"/>
            </layout>
      </appender>

    <logger name="ErrorLog">
        <level value="error"/>
        <appender-ref ref="TrackerAppender"/>
    </logger>

    <logger name="InfoLog">
        <level value ="info"/>
        <appender-ref ref="FILE_APPENDER"/>
    </logger>

</log4j:configuration>
