title: How to log different loggers into different files
body: <p>Here is what i have in my java code </p>
  
  <pre><code>private static final Logger SUCCESS = LogManager.getLogger("success");
  private static final Logger ERROR = LogManager.getLogger("error");
  </code></pre>
  
  <p>And I need to create 2 log files for these logs. (i tried to follow <a href="https://stackoverflow.com/questions/728295/creating-multiple-log-files-of-different-content-with-log4j">Creating multiple log files of different content with log4j</a>) but I think its not exactly the same. But here goes what i created in <code>log4j.properties</code>.</p>
  
  <pre><code>log4j.rootLogger=TRACE, SuccessAppender, ErrorAppender
  
  # setup SuccessAppender
  log4j.appender.SuccessAppender=org.apache.log4j.RollingFileAppender
  log4j.appender.SuccessAppender.Threshold=INFO
  log4j.appender.SuccessAppender.File=success.log
  log4j.appender.SuccessAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.SuccessAppender.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
  
  # setup ErrorAppender
  log4j.appender.ErrorAppender=org.apache.log4j.RollingFileAppender
  log4j.appender.ErrorAppender.Threshold=INFO
  log4j.appender.ErrorAppender.File=error.log
  log4j.appender.ErrorAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.ErrorAppender.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
  </code></pre>
  
  <p>I was wondering how to map this "success" log into the "SuccessAppender". </p>