title: How to write different log levels into different rolling files in log4j2
body: <p>I have a log4j2.xml as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;Configuration&gt;
          &lt;Properties&gt;
              &lt;Property name="dir" value="/var/log/sunverge" /&gt;
              &lt;Property name="file" value="maggie.log" /&gt;
              &lt;Property name="eatonemcbfile" value="eaton.log" /&gt;
          &lt;/Properties&gt;
  
          &lt;Appenders&gt;
              &lt;Console name="STDOUT" target="SYSTEM_OUT"&gt;
                  &lt;PatternLayout pattern="%d{ISO8601} %5p [%t] %c - %m%n" /&gt;
              &lt;/Console&gt;
              &lt;RollingFile name="file" fileName="${dir}/${file}"
                  filePattern="${dir}/${file}.%d{yyyy-MM-dd}"&gt;
                  &lt;PatternLayout&gt;
                      &lt;Pattern&gt;%d{ISO8601} %5p [%t] %c - %m%n&lt;/Pattern&gt;
                  &lt;/PatternLayout&gt;
                  &lt;Policies&gt;
                      &lt;TimeBasedTriggeringPolicy interval="1" /&gt;
                  &lt;/Policies&gt;
              &lt;/RollingFile&gt;
              &lt;RollingFile name="eaton"
                  fileName="${dir}/${eatonemcbfile}"
                  filePattern="${dir}/${eatonemcbfile}.%d{yyyy-MM-dd}"&gt;
                  &lt;PatternLayout&gt;
                      &lt;Pattern name="ConversionPattern"&gt; %d{ISO8601} %5p [%t] %c - %m%n&lt;/Pattern&gt;
                  &lt;/PatternLayout&gt;
                  &lt;ThresholdFilter level="debug"/&gt;
                  &lt;Policies&gt;
                      &lt;TimeBasedTriggeringPolicy interval="1" /&gt;
                  &lt;/Policies&gt;
              &lt;/RollingFile&gt;
          &lt;/Appenders&gt;
  
          &lt;Loggers&gt;
              &lt;Root level="warn"&gt;
                  &lt;AppenderRef ref="file" /&gt;
              &lt;/Root&gt;
              &lt;logger name="com.sunverge.devices.eaton.emcb" level="info"&gt;
                  &lt;AppenderRef ref="eaton" /&gt;
                  &lt;AppenderRef ref="file" /&gt;
              &lt;/logger&gt;
          &lt;/Loggers&gt;
      &lt;/Configuration&gt;
  </code></pre>
  
  <p>So however, I set the threshold for the eaton.log to be debug but both of them log the debug level. For some reason I don't want to add add the ThresholdFilter tag for the other file. Any help appreciated.</p>