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

<log4j:configuration>

  <appender name="IOAppender" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="File" value="logs/io.log"/>
    <param name="DatePattern" value=".yyyy-MM-dd"/>
    <param name="Encoding" value="Windows-1251"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss.SSS} %-5p: %C: %m%n"/>
    </layout>
  </appender>

  <appender name="MainAppender" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="File" value="logs/main.log"/>
    <param name="DatePattern" value=".yyyy-MM-dd"/>
    <param name="Encoding" value="Windows-1251"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss.SSS} %-5p: %C: %m%n"/>
    </layout>
  </appender>

  <appender name="ErrorAppender" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="File" value="logs/errors.log"/>
    <param name="DatePattern" value=".yyyy-MM-dd"/>
    <param name="Encoding" value="Windows-1251"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss.SSS} %-5p: %C: %m%n"/>
    </layout>
  </appender>
  
  <appender name="ExternalAppender" class="org.apache.log4j.DailyRollingFileAppender">
    <param name="File" value="logs/external.log"/>
    <param name="DatePattern" value=".yyyy-MM-dd"/>
    <param name="Encoding" value="Windows-1251"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss.SSS} %-5p: %C: %m%n"/>
    </layout>
  </appender>
  
  <appender name="console" class="org.apache.log4j.ConsoleAppender">
    <param name="Encoding" value="CP866"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss.SSS} %-5p: %C: %m%n"/>
    </layout>
  </appender>

  <logger name="Main">
    <level value="all"/>
    <appender-ref ref="MainAppender"/>
<!--    <appender-ref ref="console"/> -->
  </logger>

  <logger name="Error">
    <level value="all"/>
    <appender-ref ref="ErrorAppender"/>
  </logger>

  <logger name="IOLogger">
    <level value="all"/>
    <appender-ref ref="IOAppender"/>
  </logger>
  
  <logger name="External">
    <level value="all"/>
    <appender-ref ref="ExternalAppender"/>
  </logger>
  

</log4j:configuration>
