<?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">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS} %-5p %c{1}(%F:%L %M) - %m%n"/>
    </layout>
  </appender>

  <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/var/log/unitedfront2/unitedfront2.log" />
    <param name="Append" value="true" />
    <param name="MaxFileSize" value="10MB"/>
    <param name="MaxBackupIndex" value="10"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS} %-5p %c{1}(%F:%L %M) - %m%n"/>
    </layout>
  </appender>

  <appender name="ACCESS_LOG" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/var/log/unitedfront2/access_log.log" />
    <param name="Append" value="true" />
    <param name="MaxFileSize" value="10MB"/>
    <param name="MaxBackupIndex" value="10"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d{yyyy/MM/dd HH:mm:ss.SSS}%m%n"/>
    </layout>
  </appender>

  <category name="org.unitedfront2.web.handler.AccessLogInterceptor" additivity="false">
    <priority value="info"/>
    <appender-ref ref="ACCESS_LOG"/>
  </category>

  <category name="org.unitedfront2" additivity="false">
    <priority value="warn"/>
    <appender-ref ref="FILE"/>
  </category>

  <root>
    <priority value="warn"/>
    <appender-ref ref="FILE"/>
  </root>

</log4j:configuration>