title: Log4Net RollingFileAppender with composite rolling style is overwritting data
body: <p>I have a Log4Net RollingFileAppender that is configured as:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;configuration&gt;
  
    &lt;configSections&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/&gt;
    &lt;/configSections&gt;
  
    &lt;log4net&gt;
  
      &lt;root&gt;
        &lt;level value="ALL" /&gt;
      &lt;/root&gt;
  
      &lt;logger name="RollingFileAppender" additivity="false"&gt;
        &lt;level value="DEBUG"/&gt;
        &lt;appender-ref ref="RollingFileAppender" /&gt;
      &lt;/logger&gt;
  
      &lt;appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender" &gt;
        &lt;param name="File" value="C:\\MyLog.log" /&gt;
        &lt;param name="AppendToFile" value="true" /&gt;
        &lt;param name="DatePattern" value="yyyy-MM-dd"/&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="%m%n"/&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
  
    &lt;/log4net&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Looking at the <a href="http://logging.apache.org/log4net/release/sdk/log4net.Appender.RollingFileAppender.RollingStyle.html" rel="noreferrer">documentation</a>, the <strong>The default rolling style is Composite</strong>, so it makes sense this will roll when it reaches a certain size (the default of 10MB), not just on the date.</p>
  
  <p>The problem is when it hits the size, it is restarting the log and I am losing the data from the first half of the day (it reaches this size around noon).<br>
  Why wouldn't this just roll to a new file and all future log lines are put into the MyLog.log?
  Or is it the log is rolling, but then at midnight, it is rolling again and overwritting the dated log (eg. rolling to MyLog.log2009-04-08 once it reaches 10MB, and then overwritting this same file at midnight)?</p>
  
  <p>I will set the</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;rollingStyle value="Date" /&gt;
  </code></pre>
  
  <p>Is this all I have to do to ensure it only rolls on the Date boundary?  Can I change this on the fly in the Log4Net.config, or do I have to restart the application?  It is running on IIS6.</p>