title: How do I make logback read a properties file which name is a variable?
body: <p>I am using <a href="http://logback.qos.ch/">http://logback.qos.ch/</a></p>
  
  <p>I am running my java process with a parameter for example <code>-Dproperties.url=myappproperties-production.properties</code> or <code>-Dproperties.url=myappproperties-development.properties</code> depending on the environemnt it is run in.</p>
  
  <p>Problem: how to make logback pick up my properties file?</p>
  
  <p>If the properties file name is static I would do (<strong>works fine</strong>):</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;property resource="myappproperties-development.properties" /&gt;
      (...)
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But I need something that is dynamic (<strong>this does not work</strong>):</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;property resource="${properties.url}" /&gt;
      (...)
  &lt;/configuration&gt;
  </code></pre>