title: Logback configuration: factoring out reusable parts
body: <p>Is there a way to factor out and parameterize repeating parts of Logback XML configuration? I have many different rolling file appenders configured basically the same except for the file names. I use that in conjunction with a bunch of loggers with their 'additivity' turned off so I can redirect different parts of the stack to different files. This adds up to a cumbersome and long configuration file composed of many almost identical segments.</p>
  
  <p>I've used Logback's <code>&lt;include&gt;</code> feature before, but it doesn't address this reuse issue since I can't parameterize the included configuration. I'd expect such a feature to look something akin to:</p>
  
  <pre><code>&lt;include resource="file-appender.xml"&gt;
      &lt;property name="filePath" value="/where/logs/go" /&gt;
      &lt;property name="baseLogger" value="com.mycompany.thatpartofthestack" /&gt;
  &lt;/include&gt;
  </code></pre>
  
  <p>But as far as I understand that's wishful thinking. Is there another way of factoring out Logback's configuration via templates, macros, functions or whatnot?</p>