title: log4j Daily and size based appender with new log file every restart
body: <p>Im trying to create log4j appender which:</p>
  
  <p>-Creates new log file every day</p>
  
  <p>-Creates new log file every application restart</p>
  
  <p>-Creates new log file every 500mb</p>
  
  <p>-Saves old log files to zip</p>
  
  <p>I tried different configurations, below is last one. But this one also does not work. Is it even possible to do what i need?</p>
  
  <pre><code>&lt;appender name="default" class="org.apache.log4j.DailyRollingFileAppender"&gt;
      &lt;param name="file" value="log.log" /&gt;
      &lt;param name ="DatePattern" value="'.'yyyyMMdd" /&gt;
  
  
      &lt;rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"&gt;
        &lt;param name="activeFileName" value="log.log" /&gt;
        &lt;param name="FileNamePattern" value="log_%d{yyyyMMdd}.log.%i.zip"/&gt;
        &lt;param name="minIndex" value="1"/&gt;
        &lt;param name="maxIndex" value="10"/&gt;
      &lt;/rollingPolicy&gt;
  
      &lt;triggeringPolicy class="org.apache.log4j.rolling.SizeBasedTriggeringPolicy"&gt;
                  &lt;param name="MaxFileSize" value="500 MB" /&gt;
      &lt;/triggeringPolicy&gt;
  
      &lt;TimeBasedTriggeringPolicy interval="1" modulate="true"/&gt;
  
      &lt;OnStartupTriggeringPolicy/&gt;
  
      &lt;layout class="mycustomlayout"&gt;
  
      &lt;/layout&gt;
  
    &lt;/appender&gt;
  </code></pre>