<?xml version="1.0" encoding="utf-8"?>

<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{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %m%n"/>
    </layout>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
      <param name="LevelMin" value="DEBUG"/>
      <param name="LevelMax" value="DEBUG"/>
    </filter>
  </appender>
  <appender name="AInfo" class="org.apache.log4j.DailyRollingFileAppender">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %m%n"/>
    </layout>
    <param name="File" value="logs/access.log"/>
    <param name="DatePattern" value="'.'yyyy-MM-d"/>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
      <param name="LevelMin" value="INFO"/>
      <param name="LevelMax" value="INFO"/>
    </filter>
  </appender>
  <appender name="AError" class="org.apache.log4j.DailyRollingFileAppender">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %m%n"/>
    </layout>
    <param name="File" value="logs/error.log"/>
    <param name="DatePattern" value="'.'yyyy-MM-d"/>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
      <param name="LevelMin" value="ERROR"/>
      <param name="LevelMax" value="ERROR"/>
    </filter>
  </appender>
  <root>
    <priority value="ALL"/>
    <appender-ref ref="stdout"/>
    <appender-ref ref="AInfo"/>
    <appender-ref ref="AError"/>
  </root>
  
  <logger name="org.apache.http" additivity="false">
    <level value="WARN"/>
  </logger>
</log4j:configuration>
