title: how to log only one level with log4j2?
body: <p>I'm using log4j2 in my application.</p>
  
  <p>What I want is everything up to 'debug' to go to console, everything up to 'info' to go to myapp.log, and ONLY 'info' to go to 'myapp-audit.log'.</p>
  
  <p>The reason is, INFO mostly consists of successful modifications to data (ex. 'user created', 'user updated', 'user deleted', and so on).  If is effectively an audit log of data modifications.</p>
  
  <p>But I can't get figure out how to do it.</p>
  
  <p>How do I get ONLY 'info' to get logged to 'myapp-audit.log'?  Here's my current configuration ...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration status="WARN"&gt;
      &lt;appenders&gt;
          &lt;Console name="Console" target="SYSTEM_OUT"&gt;
              &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /&gt;
          &lt;/Console&gt;
  
          &lt;File name="LogFile" fileName="myapp.log"&gt;
              &lt;PatternLayout
                  pattern="%d{yyyy-mm-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /&gt;
          &lt;/File&gt;
  
          &lt;File name="AuditFile" fileName="myapp-audit.log"&gt;
              &lt;PatternLayout
                  pattern="%d{yyyy-mm-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /&gt;
          &lt;/File&gt;
      &lt;/appenders&gt;
  
      &lt;loggers&gt;
          &lt;root level="debug"&gt;
              &lt;appender-ref ref="Console" level="debug" /&gt;
              &lt;appender-ref ref="LogFile" level="info" /&gt;
              &lt;appender-ref ref="AuditFile" level="info" /&gt; &lt;!-- I want ONLY 'info' here --&gt;
          &lt;/root&gt;
      &lt;/loggers&gt;
  &lt;/configuration&gt;
  </code></pre>