<?xml version="1.0" encoding="UTF-8" ?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
    <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
      <param name="FileNamePattern" value="/var/log/driveshaft/runlog-%d{yyyy-MM-dd}.log.gz"/>
    </rollingPolicy>

    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="[%d] [%t] [%p] [%t] [%c] %m%n"/>
    </layout>
  </appender>

  <root>
    <priority value ="info"/>
    <appender-ref ref="ROLL"/>
  </root>

</log4j:configuration>


<?xml version="1.0" encoding="UTF-8" ?>
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="RollInfo" class="org.apache.log4j.rolling.RollingFileAppender">
    <param name="Threshold" value="INFO"/>
    <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
      <param name="FileNamePattern" value="/var/log/driveshaft/info-%d{yyyy-MM-dd}.log"/>
    </rollingPolicy>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="[%d] [%t] [%p] [%t] [%c] %m%n"/>
    </layout>
  </appender>

  <appender name="RollError" class="org.apache.log4j.rolling.RollingFileAppender">
    <param name="Threshold" value="ERROR"/>
    <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
      <param name="FileNamePattern" value="/var/log/driveshaft/error-%d{yyyy-MM-dd}.log"/>
    </rollingPolicy>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="[%d] [%t] [%p] [%t] [%c] %m%n"/>
    </layout>
  </appender>

  <root>
    <priority value="info"/>
    <appender-ref ref="RollInfo"/>
    <appender-ref ref="RollError"/>
  </root>

</log4j:configuration>

Split info and error logs into separate files
Split info and error logs into separate files
