title: How do I overwrite a log file in log4j?
body: <p>I have a log file that has the following appender added to it :</p>
  
  <pre><code>
  logger.addAppender(new FileAppender(new PatternLayout(),"log.txt"));
  </code></pre>
  
  <p>the thing is, each time I'm running my application, additional logging information gets appended to the same log file. What can I do to overwrite the file each time ?</p>