title: Log4j configuration for spring MVC app on Tomcat
body: <p>I've been developing a simple Spring MVC application as a reporting service.  Locally, I've been running the application with the maven-tomcat-plugin, using <code>mvn tomcat:run</code>.  This works exactly as expected.  However, I'm now trying to deploy this service to a server running Tomcat 6.  I load the war file into the webapps directory, Tomcat notices it, deploys it, and then complains:</p>
  
  <pre><code>log4j:WARN No appenders could be found for logger
  (org.springframework.web.filter.CharacterEncodingFilter).
  
  log4j:WARN Please initialize the log4j system properly.
  </code></pre>
  
  <p>And, unsurprisingly, no logging for the service works.</p>
  
  <p>This above error message isn't clear to me, and I wonder if anyone could give me some assistance.</p>
  
  <p>For posterity, I have a very simple log4j.properties file (Which lives in <code>/src/main/resources</code>):</p>
  
  <pre><code>log4j.rootLogger=WARN, console
  
  log4j.appender.console=org.apache.log4j.ConsoleAppender
  log4j.appender.console.layout=org.apache.log4j.PatternLayout
  log4j.appender.console.layout.ConversionPattern= %d{HH:mm:ss,SSS} [%t] %-5p %x %C{1} : %m%n
  
  log4j.logger.com.rtr=DEBUG
  </code></pre>
  
  <p>My current hypothesis is that the tomcat box might not be seeing this property bundle at all, but I'm not sure.  I was able to confirm this hypothesis by hot-copying the bundle into <code>WEB-INF/classes</code>, and getting an appropriate result.  What is the correct location that is both on the classpath, but not in a strange location?</p>
  
  <p>Any guidance is appreciated.</p>