title: Where should I put log4j.jar?
body: <p>I create a Tomcat webapp project. If I put the <strong>log4j.xx.jar &amp; log4j.properties</strong> in the Tomcat lib, I get the log file. If I put the log4j.properties in the WEB-INF/classes, I doesn't get the log file. I try again and again. <strong>When I put the log4j.xx.jar in the WEB-INF/lib and put the log4j.properties in the WEB-INF/classes</strong>, I get it again. Why? What's the logic?</p>
  
  <pre><code>log4j.rootLogger=INFO,A1, A2
  #org.apache.log4j.ConsoleAppender
  log4j.appender.A1=org.apache.log4j.FileAppender 
  log4j.appender.A1.File=D:\\Tomcat2\\logs\\monitor.log
  log4j.appender.A1.layout=org.apache.log4j.PatternLayout
  log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
  
  log4j.appender.A2=org.apache.log4j.ConsoleAppender
  log4j.appender.A2.layout=org.apache.log4j.PatternLayout
  log4j.appender.A2.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
  </code></pre>