title: Log4j2 custom log level filtering to different files
body: <p>This is my log4j properties file</p>
  
  <pre><code>&lt;Configuration status="WARN"&gt;
  &lt;CustomLevels&gt;
      &lt;CustomLevel name="ANALYTICS" intLevel="50" /&gt;
  &lt;/CustomLevels&gt;
  
  &lt;Appenders&gt;
      &lt;Console name="Console" target="SYSTEM_OUT"&gt;
          &lt;PatternLayout pattern="%d %-7level %logger{36} - %msg%n"/&gt;
      &lt;/Console&gt;
      &lt;File name="MyFile" fileName=abc.log"&gt;
          &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} - %5p - %c - %m%n" /&gt;
      &lt;/File&gt;
      &lt;File name="analyticsFile" fileName="efg.log"&gt;
          &lt;PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} - %5p - %c - %m%n" /&gt;
      &lt;/File&gt;
  &lt;/Appenders&gt;
  &lt;Loggers&gt;
      &lt;Root level="TRACE"&gt;
          &lt;AppenderRef ref="MyFile" level="TRACE" /&gt;
          &lt;AppenderRef ref="analyticsFile" level="ANALYTICS" /&gt;
      &lt;/Root&gt;
  &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>Here, I've created a custom log level (ANALYTICS = 50) which has a value lower than the FATAL (100) level. There are 2 files which will collect all my logs. efg.log collects all the ANALYTICS level logs which is currently working. abc.log is collecting all the logs along with ANALYTICS log. I must avoid writing of ANALYTICS logs inside abc.log. abc.log should collect all logs other than ANALYTICS log.</p>
  
  <p>What is the change required?</p>