title: Creating Different log files using log4j
body: <p>I am trying to write logs in different files. I want to be able to write into different files from different methods. Say if there is an exception in Method A it writes in File A...if there is an exception in Method B write in File B. I read help on google, but they all suggest the debug, trace etc etc levels. My messages are all error messages, just the methods are different. I am using properties file for log4j. This is what it looks like:</p>
  
  <pre><code>log4j.rootLogger=ERROR, ROOT
  log4j.appender.ROOT=org.apache.log4j.RollingFileAppender
  log4j.appender.ROOT.File=(**my_path**)\EmailIntegration.log
  log4j.appender.ROOT.MaxFileSize=1000KB
  log4j.appender.ROOT.MaxBackupIndex=5
  log4j.appender.ROOT.layout=org.apache.log4j.PatternLayout 
  log4j.appender.ROOT.layout.ConversionPattern=[%d] %t %c %-5p - %m%n
  log4j.logger.com.webage.ejbs=INFO
  </code></pre>