title: Log file name to include current date in log4j
body: <p>The question is a subset of <a href="https://stackoverflow.com/questions/192456/setting-a-log-file-name-to-include-current-date-in-log4j">this</a>.
  I want a log file to be created everyday with the log file name format as follows:
   <code>downloadmanageryyyy-MM-dd.log</code><br>
  Using <code>DailyRollingAppender</code>but the log file is not created at all. </p>
  
  <p>My lo4j.xml looks like this:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8" ?&gt;
                           &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
     &lt;log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'&gt;
     &lt;appender name="InfoLogFile" class="org.apache.log4j.DailyRollingFileAppender"&gt;
         &lt;param name="File" value="downloadmanager.log"/&gt;
         &lt;param name="DatePattern" value=".yyyy-MM-dd" /&gt;
         &lt;layout class="org.apache.log4j.PatternLayout"&gt; 
         &lt;param name="ConversionPattern" 
        value="%d{yyyy-MMM-dd HH:mm:ss,SSS} [%t] %c %x%n  %-5p %m%n"/&gt;
        &lt;/layout&gt;
     &lt;/appender&gt;  
    &lt;/log4j:configuration&gt;
  </code></pre>