title: configuring log4j.properties file | separating logs
body: <p>I am using hibernate in my webpoject.I have my log4j.propertes under WEB-INF/classes.I want seperate log files for hibernate logs and my application log.In shot am not interested in hibernate logs but am interested only in my application log.</p>
  
  <p>I have following in my log4j.properties</p>
  
  <pre><code># Define the root logger with appender file
  logDir = ${catalina.home}/logs/akp.log
  log4j.rootLogger = DEBUG, FILE
  
  #Define the file appender
  log4j.appender.FILE=org.apache.log4j.FileAppender
  log4j.appender.FILE.File= ${catalina.home}/logs/${fileName}.log
  </code></pre>
  
  <p>And within my app i am getting a instance of my logger as</p>
  
  <pre><code>private Logger logger = Logger.getLogger(MyClass.class.getName());
  </code></pre>
  
  <p>But in logs folder i can see only one file with exmpt name : .log (not xyz.log).Also withing this name i have all mixed logs.I want seperate log file for each of my applation class as i am using</p>
  
  <pre><code> logger = Logger.getLogger(MyClass.class.getName());
  </code></pre>