title: log4j log file not updating
body: <p>I have a Java spring application in maven framework running in Tomacat.</p>
  
  <p><strong>IDE: Eclipse</strong></p>
  
  <p>Created a <strong><code>log4j.properties file</code></strong> and put it in a folder called 'log'. Right clicked on the log folder.</p>
  
  <pre><code>Selected 'Build Path --&gt; Use as source folder'
  </code></pre>
  
  <p>Below given is my <strong><code>log4j.properties</code></strong>.</p>
  
  <pre><code>log = /log4j
  log4j.rootLogger = DEBUG, FILE
  log4j.appender.FILE=org.apache.log4j.FileAppender
  log4j.appender.FILE.File=${log}/log.out
  log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
  log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd}-%t-%x-%-5p-%-10c:%m%n
  </code></pre>
  
  <p>This is the way I followed for logging</p>
  
  <pre><code>static Logger log = Logger.getLogger(Sample.class.getName());
  log.info("sample");
  </code></pre>
  
  <p>My issue is</p>
  
  <pre><code>1. While maven install, log file created in D:\log4j\log.out
  2. I deleted the file. then run the application
  3. Now file created. But no content. Its size is 0 KB.
  4. When I stop the application, the file is updated with the content.
  </code></pre>
  
  <p>Where am I mistaken?</p>