title: How to use current date pattern in log4j2 fileName?
body: <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration&gt;
      &lt;Properties&gt;
          &lt;property name="filePattern"&gt;%d{yyyy-MM-dd}&lt;/property&gt;
      &lt;/Properties&gt;
      &lt;Appenders&gt;
          &lt;RollingFile name="TEST" fileName="application-${filePattern}.log" filePattern="application-${filePattern}-rolled.log"&gt;
              &lt;Policies&gt;
                  &lt;TimeBasedTriggeringPolicy modulate="true"/&gt;
              &lt;/Policies&gt;
          &lt;/RollingFile&gt;
      &lt;/Appenders&gt;
      //...
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>I'd like to use the current date directly in the written logfile. But the result of the configuration above is <code>application-%{yyyy-MM-dd}</code> as filename.</p>
  
  <p>Why is the date placeholder not resolved?
  By the way: the renamed file on midnight is properly renamed like <code>application-2016-03-13-rolled.log</code>. Why does it work there, but not in the current logfile?</p>
  
  <p>I'm running  <code>tomcat 8</code> and <code>java 8</code>, if that matters.</p>