title: Configuring Logback - logback.xml
body: <p>I have a number of the same apps running in a given tomcat all under different URLs and <code>web.xml</code> files.</p>
  
  <p>I want to make one <code>logback.xml</code> that is the same for each. But i want the pattern to have the servername or display-name in it. i have tried <code>%property{}</code> or <code>${}</code> to put this in, but no luck. </p>
  
  <p>The application is 12+ years old, it doesn't use modern frameworks so logback is simple.</p>
  
  <pre><code>&lt;configuration scan="true" scanPeriod="30 seconds"&gt;
      &lt;!-- output changes to logging status to the console. Handy to see when your changes have been reflected. --&gt;
      &lt;statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /&gt;
      &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
          &lt;!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --&gt;
          &lt;encoder&gt;
              &lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n&lt;/pattern&gt;
          &lt;/encoder&gt;
      &lt;/appender&gt;
      &lt;root level="warn"&gt;
          &lt;appender-ref ref="STDOUT" /&gt;
      &lt;/root&gt;
      &lt;logger name="org.apache.jsp.actions.form" level="debug" /&gt;
        &lt;logger name="com.sok.runway.offline.rpmManager" level="debug" /&gt;
  &lt;/configuration&gt;
  </code></pre>