title: User JVM parameter in log4j2 configuration
body: <p>I have an RollingFile Appender defined in my log4j2.xml.</p>
  
  <pre><code>&lt;RollingFile name="RollingFile" fileName="/logs/app.log"
              filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz"&gt;
              &lt;PatternLayout&gt;
                  &lt;Pattern&gt;%d{HH:mm:ss.SSS} - %-5p - %m - [%l]%n&lt;/Pattern&gt;
              &lt;/PatternLayout&gt;
              &lt;Policies&gt;
                  &lt;TimeBasedTriggeringPolicy /&gt;
                  &lt;SizeBasedTriggeringPolicy size="10 MB" /&gt;
              &lt;/Policies&gt;
              &lt;DefaultRolloverStrategy max="20" /&gt;
  &lt;/RollingFile&gt;
  </code></pre>
  
  <p>What I want to do is to pass this parameter to the JVM at startup:</p>
  
  <pre><code>-Dapp_home=/home/admin/server
  </code></pre>
  
  <p>The <a href="https://logging.apache.org/log4j/2.0/manual/lookups.html#JmxRuntimeInputArgumentsLookup" rel="noreferrer">documentation</a> is pretty straight forward. And from what I understand it should work like this:</p>
  
  <pre><code>&lt;RollingFile name="RollingFile" fileName="${jvmrunargs:app_home}/logs/app.log"
  </code></pre>
  
  <p>But it doesn't. I verified that it is working in general by using the absolut path.</p>
  
  <p>In an other application where I use log4j (1.x) it works like this:</p>
  
  <pre><code>log4j.appender.file.File=${app_home}/logs/app.log
  </code></pre>