title: log4j logging to catalina.out in unix instead of log file
body: <p>In my web application I am inititalizing logging in my web application by using the <code>PropertyConfigurator.configure(filepath)</code> function in a servlet which is loaded on startup.</p>
  
  <pre><code>String log4jfile = getInitParameter("log4j-init-file");
  if (log4jfile != null) {
       String propfile = getServletContext().getRealPath(log4jfile);
       PropertyConfigurator.configure(propfile);
  </code></pre>
  
  <p>I have placed my <strong>log4j.properties</strong> file in <strong>WEB_INF/classes</strong> directory and am specifying the file as </p>
  
  <pre><code>log4j.appender.rollingFile.File=${catalina.home}/logs/myapp.log
  </code></pre>
  
  <p>My root logger was initally configured as: </p>
  
  <pre><code>log4j.rootLogger=DEBUG, rollingFile,console
  </code></pre>
  
  <p>(I believe the console attribute also logs the statements into catalina.out)</p>
  
  <p>In windows the logging seems to occor normally with the statements appearing in the log file.</p>
  
  <p>In unix my logging statements are being redirected to the catalina.out instead of my actual log file(Which contains only logs from the initalization servlet). All subsequent logs show up in catalina.out. </p>
  
  <p>This leads me to believe that my log4j is not getting set properly but I am unable to figure out the cause. Could anyone help me figure out where the problem might be.</p>
  
  <p>Thanks in advance,
  Fell</p>