title: Log4Net put log files in year and month folders
body: <p>I've tried several of the suggestions I've found here on StackOverflow and finally ended up with the following which seemed to get the job done:</p>
  
  <pre><code>    &lt;appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"&gt;
          &lt;file type="log4net.Util.PatternString" value="%appSetting{LogsFolder}\%date{yyyy}\%date{MM}\MyLogs.log" /&gt;
          &lt;lockingModel type="log4net.Appender.FileAppender+MinimalLock" /&gt;
          &lt;appendToFile value="true" /&gt;
          &lt;rollingStyle value="Date" /&gt;
          &lt;datePattern value="ddMMyyyy" /&gt;
          &lt;preserveLogFileNameExtension value="true" /&gt;
          &lt;staticLogFileName value="true" /&gt;
          &lt;layout type="log4net.Layout.PatternLayout"&gt;
              &lt;conversionPattern value="%date [%thread] %-5level %logger (%property{culture}) %identity - %message%newline" /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  </code></pre>
  
  <p>However, after several months of logging I see that the configuration is incorrect, but I cannot see what is causing the problem.</p>
  
  <p>I get a folder structure having <em>year</em> first and <em>month</em> second, but I still haven't got a folder for <em>12</em> yet (december). The newest folder I have is <em>11</em> and this one contains all logs for November from the 6th and to the 30th in addition to the logs for December.</p>
  
  <p>The filenames are <em>MyLogs12112018.log</em> etc, where the pattern is day/month/year.</p>
  
  <p>I would really like to add a <em>dot</em> (.) between <em>MyLogs</em> and the date but that is secondary.</p>
  
  <p>However, why are the log files placed in incorrect folders?</p>