title: log4j Could not read configuration file
body: <p>I am adding logging to a java web project I am working on. I have run into an error that I am unable to figure out.</p>
  
  <p>The error I am getting from tomcat is:<br>
  <code>log4j:ERROR Could not read configuration file [log4j.properties].
  java.io.FileNotFoundException: log4j.properties (No such file or directory)</code></p>
  
  <p>I have this simple method in my class:</p>
  
  <pre><code>@RemotingInclude
  public UserAccount save(UserAccount dataObject)
  {
      PropertyConfigurator.configure("log4j.properties");
      logger.debug(dataObject.toString());
  
      return dao.save(dataObject);
  }
  </code></pre>
  
  <p>When I look in my webapps//WEB-INF/class folder I do see my log4j.properties file. When I deploy to my tomcat server and restart tomcat, I do see my admin.log file created, but nothing is written to it. Even after hitting the method above. Any help with this is greatly appreciated.</p>
  
  <p>This is the current contents of my log4j.properties file:  </p>
  
  <pre><code>log4j.appender.AdminFileAppender=org.apache.log4j.FileAppender
  log4j.appender.AdminFileAppender.File=admin.log
  log4j.appender.AdminFileAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.AdminFileAppender.layout.ConversionPattern= %-4r [%t] %-5p %c %x - %m%n.
  log4j.appender.ReportFileAppender=org.apache.log4j.FileAppender
  log4j.appender.ReportFileAppender.File=report.log
  log4j.appender.ReportFileAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.ReportFileAppender.layout.ConversionPattern= %-4r [%t] %-5p %c %x - %m%n
  log4j.logger.com.rottmanj.services=WARN,AdminFileAppender
  </code></pre>