title: How to configure log4j to log different log levels to different files for the same logger
body: <p>I have a normal INFO level log for application. What I need is to additionally log all ERROR level events to separate error log. I am using configuration like this:</p>
  
  <pre><code>&lt;logger name="com.acme"&gt;
    &lt;level value="error"/&gt;
    &lt;appender-ref ref="error"/&gt;
  &lt;/logger&gt;
  
  &lt;logger name="com.acme"&gt;
    &lt;level value="info"/&gt;
  &lt;/logger&gt;
  
  &lt;root&gt;
    &lt;level value="warn"/&gt;
    &lt;appender-ref ref="general"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>This configuration logs errors only. If I put info level logger first, then it will log only to general appender, but error logger will not work. I would like to have them both working.</p>