title: logback: Two appenders, multiple loggers, different levels
body: <p>I want to have two log files in my application (Spring Integration), debug.log and main.log.  I want to run main.log at an INFO level and debug.log at a DEBUG level.  This is doable with filters on the appenders.  I want to log different levels to the appenders based on the source.  In other words</p>
  
  <pre><code>&lt;logger name="org.springframework" level="ERROR"&gt;
      &lt;appender-ref ref="main" /&gt;
  &lt;/logger&gt;
  &lt;logger name="org.springframework" level="DEBUG"&gt;
      &lt;appender-ref ref="debug" /&gt;
  &lt;/logger&gt;
  &lt;logger name="com.myapp" level="INFO"&gt;
      &lt;appender-ref ref="main" /&gt;
  &lt;/logger&gt;
  &lt;logger name="com.myapp" level="DEBUG"&gt;
      &lt;appender-ref ref="debug" /&gt;
  &lt;/logger&gt;
  </code></pre>
  
  <p>So to summarise:</p>
  
  <ol>
  <li>Spring logger
  <ul>
  <li>main -> ERROR</li>
  <li>debug -> DEBUG</li>
  </ul></li>
  <li>com.myapp logger
  <ul>
  <li>main -> INFO</li>
  <li>debug -> DEBUG</li>
  </ul></li>
  </ol>
  
  <p>Because of this I have to have the loggers running at DEBUG and a threshold filter on an appender isn't fine grained enough.</p>
  
  <p><strong>Update</strong> Added clarity to the question</p>