title: Logging stop rolling to new files
body: <p>Current spring application takes <code>slf4j</code>, <code>log4j</code> and <code>slf4j-log4j12</code> as logging utility.</p>
  
  <p>Problems are, </p>
  
  <p>(1) Each time when the log file is opened on by external tool(wordpad or ultraedit), then the file stopped to roll over. It is very annoying as the file may grow like 10 gigabytes. </p>
  
  <p>(2) <code>MaxFileSize</code> is set to 10Mb, but each time the log file rolling to 20Mb.</p>
  
  <p>here is the config</p>
  
  <pre><code>log4j.rootLogger=DEBUG, ROL
  log4j.appender.ROL=org.apache.log4j.RollingFileAppender
  log4j.appender.ROL.Encoding=Unicode
  log4j.appender.ROL.File=D:\\IamdWatchingYou.log
  log4j.appender.ROL.MaxFileSize=10000KB
  log4j.appender.ROL.MaxBackupIndex=10
  log4j.appender.ROL.layout=org.apache.log4j.PatternLayout
  log4j.appender.ROL.layout.ConversionPattern=%d -- %p -- %c -- %m%n
  </code></pre>
  
  <p>And this issue happens in general all major app servers(Tomcat, websphere and sometimes, Jboss).</p>
  
  <p>The question is, what is the root cause(compatibility or configuration). If choose other logging implementations(Logback or JDK logging), is it going to fix the issue? I simply just wish to stop making huge log files.</p>