title: How to log in different file? log4j2
body: <p>I need to log all info to info.log, all warn to warn.log etc and all my logs to all.log. I've been create a log4j2.xml configuration.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;configuration monitorInterval = "3" status = "info"&gt;
          &lt;appenders&gt;
              &lt;File name="ALL_LOG" fileName="logs/all.log"&gt;
                  &lt;PatternLayout pattern="%d{ISO8601} [%-5p] (%F:%L) - %m%n"/&gt;
              &lt;/File&gt;
              &lt;File name="FILE_ERROR" fileName="logs/error.log"&gt;
                  &lt;PatternLayout pattern="%d{ISO8601} [%-5p] (%F:%L) - %m%n"/&gt;
              &lt;/File&gt;
              &lt;File name="FILE_INFO" fileName="logs/info.log"&gt;
                  &lt;PatternLayout pattern="%d{ISO8601} [%-5p] (%F:%L) - %m%n"/&gt;
              &lt;/File&gt;
              &lt;File name="FILE_DEBUG" fileName="logs/debug.log"&gt;
                  &lt;PatternLayout pattern="%d{ISO8601} [%-5p] (%F:%L) - %m%n"/&gt;
              &lt;/File&gt;
              &lt;File name="FILE_WARN" fileName="logs/warn.log"&gt;
                  &lt;PatternLayout pattern="%d{ISO8601} [%-5p] (%F:%L) - %m%n"/&gt;
              &lt;/File&gt;
              &lt;Console name="STDOUT" target="SYSTEM_OUT.log"&gt;
                  &lt;PatternLayout pattern="%d{ABSOLUTE} [%-5p] (%F:%L) - %m%n"/&gt;
              &lt;/Console&gt;
          &lt;/appenders&gt;
          &lt;loggers&gt;
              &lt;root&gt;
                  &lt;appender-ref ref="ALL_LOG"/&gt;
              &lt;/root&gt;
              &lt;root level="error"&gt;
                  &lt;appender-ref ref="STDOUT"/&gt;
                  &lt;appender-ref ref="FILE_ERROR"/&gt;
              &lt;/root&gt;
              &lt;root level="info"&gt;
                  &lt;appender-ref ref="FILE_INFO"/&gt;
              &lt;/root&gt;
              &lt;root level="debug"&gt;
                  &lt;appender-ref ref="FILE_DEBUG"/&gt;
              &lt;/root&gt;
              &lt;root level="warn"&gt;
                  &lt;appender-ref ref="FILE_WARN"/&gt;
              &lt;/root&gt;
          &lt;/loggers&gt;
      &lt;/configuration&gt;
  </code></pre>
  
  <p>In my programm i define logger:</p>
  
  <pre><code>public class Main {
  
  public static Logger LOG = Logger.getLogger(Main.class);
  
  public static void main(String[] args) {
      LOG.debug("Debug message");
      LOG.warn("Warning message");
      LOG.info("Info message");
  }
  </code></pre>
  
  <p>But only in file warn.log i have <code>Warning message</code>, other files create, but empty. What i doing wrong?</p>