title: log4j Properties file on daily basis
body: <p>I have a log4j properties file and i want to generate log file on daily basis and remove the file before today i mean it should contains only today's log file.</p>
  
  <p>I have used following Properties file:</p>
  
  <pre><code>log4j.rootLogger=ALL,Appender2
  log4j.appender.Appender2=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.Appender2.File=log/AlertLogfile.log
  log4j.appender.Appender2.append=true
  log4j.appender.Appender2.layout=org.apache.log4j.PatternLayout
  </code></pre>