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

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
        <param name="Threshold" value="DEBUG" />
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c:%L - %m%n" />
        </layout>
    </appender>

    <appender class="org.apache.log4j.rolling.RollingFileAppender" name="A2">
        <param value="true" name="append"/>
        <param value="logs/objectmq-temp.log" name="File"/>

        <rollingPolicy class="org.apache.log4j.rolling.FixedWindowRollingPolicy">
            <param name="fileNamePattern" value="logs/objectmq-%i.log" />
            <param name="MinIndex" value="0"/> 
            <param name="MaxIndex" value="1"/> 
        </rollingPolicy>
        
        <triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy"> 
            <param name="MaxFileSize" value="10000000"/> 
        </triggeringPolicy> 
        
        <layout class="org.apache.log4j.PatternLayout">
            <param value="%d{[yyyy-MM-dd HH:mm:ss]} %-5p %c:%L - %m%n" name="ConversionPattern"/>
        </layout>        
    </appender>

  <root> 
    <priority value ="DEBUG" /> 
    <appender-ref ref="consoleAppender" />
    <appender-ref ref="A2" />  
  </root>
  
</log4j:configuration>