title: Rollover on Log4Net
body: <p>I read an article which told that :</p>
  
  <blockquote>
    <p>rollingStyle can be either Date, Size or Composite. the default setting Composite, uses a combination of Size and Date settings. Thus if you have the datePattern set to “.yyyy-MM-dd” and maxSizeRollBackups set to 10, themn it will maintain 10 log backups for each day.
    If you have the DatePattern set to “.yyyy-MM-dd HH:mm” and maxSizeRollbackups = 10 then it will maintain 10 logfile backups per minute</p>
  </blockquote>
  
  <p>and it said :</p>
  
  <blockquote>
    <p>staticLogFileName indicates whether you need to keep writing (log) to the same file all the time. You will need to set it to false when using Date as the rolling style and you have large number of backups.</p>
  </blockquote>
  
  <p>so i do it in my <code>App.config</code> :</p>
  
  <pre><code>&lt;appender name="FileAppender" type="log4net.Appender.FileAppender"&gt;
  
    &lt;file value="E:\operativity.log" /&gt;
    &lt;staticLogFileName value="False" /&gt;
    &lt;appendToFile value="true" /&gt;
    &lt;rollingStyle value="Date" /&gt;
    &lt;datePattern value=".yyyy-MM-dd HH:mm" /&gt;
    &lt;maxSizeRollBackups value="3" /&gt;
    &lt;lockingModel type="log4net.Appender.FileAppender+MinimalLock" /&gt;
    &lt;layout type="log4net.Layout.PatternLayout"&gt;
      &lt;conversionPattern value="%date{dd/MM/yyyy HH:mm:ss.fff} - %level - %message%newline" /&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>as you see, i set <code>rollingStyle</code> to <code>Date</code> and <code>datePattern</code> to <code>.yyyy-MM-dd HH:mm</code> and
  set <code>maxSizeRollbackups</code> to <code>3</code>, and i set <code>staticLogFileName</code> to <code>False</code>, so it should take three logs in every minute  on separate files, but it does not!! what is the problem?</p>
  
  <p>NOTE: this the <a href="http://geekswithblogs.net/rgupta/archive/2009/03/03/tips-on-using-log4net-rollingfileappender.aspx" rel="nofollow noreferrer">Link</a> of article</p>
  
  <p>EDIT: I use it in a <code>windowsservice</code> and it gives me just one log file!</p>
  
  <p><img src="https://i.stack.imgur.com/7iTFB.png" alt="enter image description here"></p>