title: How to log stdout output in Tomcat?
body: <p>Is there a way to log all stdout output to the catalina.log file in Tomcat? (i.e. everything that gets printed to <code>System.out.println()</code>)</p>
  
  <p>The console window that opens when you run <code>TOMCAT/bin/startup.bat</code> displays output from stdout, but it's not saved to <code>TOMCAT/logs/catalina.&lt;date&gt;.log</code>.</p>
  
  <p>My specific problem is that I have a console appender defined in log4j to output to the console.  These log messages appear correctly in the Tomcat console window, but they are not written to catalina.log.  I'm running Tomcat 5.5 on Windows.  Thanks.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here is my log4j.properties file.  It is located at <code>TOMCAT/webapps/app/WEB-INF/classes/log4j.properties</code>:</p>
  
  <pre><code>log4j.rootCategory=DEBUG, console
  log4j.appender.console=org.apache.log4j.ConsoleAppender
  log4j.appender.console.layout=org.apache.log4j.PatternLayout
  log4j.appender.console.layout.ConversionPattern=[%d{ABSOLUTE} %-5p %c{1}]: %m%n
  </code></pre>