title: Maximum Filesize of LogFileAppender in Log4Net
body: <p>I am using Log4net for a while now and it's an amazing logging framework, especially when hooked into Castle.Windsor.  However...</p>
  
  <p>I usually use the rolling file appender, but this has resulted in too many log files than I actually want, so instead, for my latest project, have used the basic LogFileAppender instead, but the problem is the log file keeps growing (seemingly forever).</p>
  
  <p>How can I tell the appender to not go over a fixed size (and start removing old logs and appending the new ones to the file?</p>
  
  <p>My current configuration looks like:</p>
  
  <pre><code>&lt;appender name="LogFileAppender" type="log4net.Appender.FileAppender"&gt;
    &lt;file value="E:\Logs\iWater\Schedule-Dispatch-API.log"/&gt;
    &lt;param name="AppendToFile" value="true"/&gt;
    &lt;maximumFileSize value="2048KB"/&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%-16date{dd MMM HH:mm:ss} %-7level %-25.35logger{1} %message%newline"/&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>Its seems like the maximumFileSize attribute is not being respected.  Any solutions?</p>
  
  <p>Alternatively, how can I configure the rolling file appender to only create 1 file (ever)?</p>