title: In java, how to write logs to a specific file appender of log4j?
body: <p>If a log4j properties have multiple file appenders, then in Java how can I make sure that logs are written in a specific file.</p>
  
  <pre><code>log4j.rootLogger=INFO,out 
  
  log4j.appender.SUCCESS_FILE=org.apache.log4j.FileAppender
  log4j.appender.SUCCESS_FILE.File=${dd.log.dir}/success.log
  
  log4j.appender.VALID_FILE=org.apache.log4j.FileAppender
  log4j.appender.VALID_FILE.File=${dd.log.dir}/valid_error.log
  
  log4j.appender.TEMP_FILE=org.apache.log4j.FileAppender
  log4j.appender.TEMP_FILE.File=${dd.log.dir}/Temp_error.tmp_log
  </code></pre>
  
  <p>In Java class, what can I do to write some messages to, lets say, SUCCESS_FILE and some messages to TEMP_FILE</p>
  
  <pre><code>Logger log = Logger.getLogger(Test.class);
  log.debug("This message should go to SUCCESS_FILE");
  log.debug("This message should go to TEMP_FILE");
  </code></pre>