title: Log4j on Apache/Tomcat not working
body: <p>I'm working on a Java Servlet project. I'm trying to use log4j to log exceptions, methods input and output, etc.</p>
  
  <p>I have added the Jars files and the log4j.properties file.</p>
  
  <p>If I test the Log4j from a test class using Main, it works right. But when I use the Servlet project, the log file is not created.</p>
  
  <p>I'm working on Eclipse with Apache and Tomcat</p>
  
  <p>First, I thought the problem was the log4j.properties file. I move from src directory to Webcontent directory. Then I moved again to classes directory inside Webcontent directory. But I doesn't work.</p>
  
  <p>This is my log4j.properties file:</p>
  
  <pre><code>log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.Target=System.out
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %c{1}:%L - %m%n
  log4j.appender.stdout.Threshold=debug
  log4j.appender.stdout.Append=true
  
  log4j.appender.FILEHIBERNATE=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.FILEHIBERNATE.layout=org.apache.log4j.PatternLayout
  log4j.appender.FILEHIBERNATE.datePattern='.'yyyy-MM-dd 
  log4j.appender.FILEHIBERNATE.file =logs/Hibernate.log
  log4j.appender.FILEHIBERNATE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [Level: %p]%m%n
  log4j.appender.FILEHIBERNATE.Threshold=debug
  log4j.appender.FILEHIBERNATE.Append=true
  
  log4j.appender.springframework=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.springframework.layout=org.apache.log4j.PatternLayout
  log4j.appender.springframework.datePattern='.'yyyy-MM-dd 
  log4j.appender.springframework.file =logs/springframework.log
  log4j.appender.springframework.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [Level: %p]%m%n
  log4j.appender.springframework.Threshold=debug
  log4j.appender.springframework.Append=true
  
  log4j.appender.fidely=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.fidely.layout=org.apache.log4j.PatternLayout
  log4j.appender.fidely.datePattern='.'yyyy-MM-dd 
  log4j.appender.fidely.file =logs/Fidely.log
  log4j.appender.fidely.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [Level: %p]%m%n
  log4j.appender.fidely.Threshold=info,debug
  log4j.appender.fidely.Append=true
  
  log4j.appender.fnet3CustomerAreaMobile=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.fnet3CustomerAreaMobile.layout=org.apache.log4j.PatternLayout
  log4j.appender.fnet3CustomerAreaMobile.datePattern='.'yyyy-MM-dd 
  log4j.appender.fnet3CustomerAreaMobile.file =logs/customer_area_interfaces/fidelynet3CustomerAreaMobile.log
  log4j.appender.fnet3CustomerAreaMobile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [Level: %p]%m%n
  log4j.appender.fnet3CustomerAreaMobile.Threshold=debug,info,error
  log4j.appender.fnet3CustomerAreaMobile.Append=true
  
  log4j.appender.fnet3CustomerAreaMobileServlet=org.apache.log4j.DailyRollingFileAppender
  log4j.appender.fnet3CustomerAreaMobileServlet.layout=org.apache.log4j.PatternLayout
  log4j.appender.fnet3CustomerAreaMobileServlet.datePattern='.'yyyy-MM-dd 
  log4j.appender.fnet3CustomerAreaMobileServlet.file =logs/customer_area_interfaces/mobile/fidelynet3CustomerAreaMobile.log
  log4j.appender.fnet3CustomerAreaMobileServlet.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} [Level: %p]%m%n
  log4j.appender.fnet3CustomerAreaMobileServlet.Threshold=debug,info,error
  log4j.appender.fnet3CustomerAreaMobileServlet.Append=true
  
  log4j.logger.net.sf.hibernate = DEBUG, FILEHIBERNATE
  log4j.logger.hibernate = DEBUG, FILEHIBERNATE
  log4j.logger.org.hibernate = DEBUG, FILEHIBERNATE
  log4j.logger.org.springframework = debug, springframework
  log4j.logger.fidely = info, fidely
  log4j.logger.fnet3CustomerAreaMobile = debug, info, error, fnet3CustomerAreaMobile
  log4j.logger.fnet3CustomerAreaMobileServlet = debug, info, error, fnet3CustomerAreaMobileServlet
  
  log4j.rootLogger = debug
  </code></pre>
  
  <p>And this is the Console:</p>
  
  <pre><code>log4j:ERROR Could not find value for key log4j.appender.info
  log4j:ERROR Could not instantiate appender named "info".
  log4j:ERROR Could not find value for key log4j.appender.error
  log4j:ERROR Could not instantiate appender named "error".
  log4j:ERROR Could not find value for key log4j.appender.info
  log4j:ERROR Could not instantiate appender named "info".
  log4j:ERROR Could not find value for key log4j.appender.error
  log4j:ERROR Could not instantiate appender named "error".
  log4j:ERROR Could not find value for key log4j.appender.info
  log4j:ERROR Could not instantiate appender named "info".
  log4j:ERROR Could not find value for key log4j.appender.error
  log4j:ERROR Could not instantiate appender named "error".
  log4j:ERROR Could not find value for key log4j.appender.info
  log4j:ERROR Could not instantiate appender named "info".
  log4j:ERROR Could not find value for key log4j.appender.error
  log4j:ERROR Could not instantiate appender named "error".
  log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester.sax).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  SLF4J: Defaulting to no-operation (NOP) logger implementation
  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
  </code></pre>
  
  <p>I don't know to do.
  Can you help me?</p>
  
  <p>Sorry for my poor english</p>