File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat redirect 'stderr' content to 'stdout' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat redirect Watch "Tomcat redirect New topic
Author

Tomcat redirect 'stderr' content to 'stdout'

Oleksander Tovstonog
Greenhorn

Joined: Nov 11, 2011
Posts: 1
I have just migrated web application from Tomcat6 to Tomcat7. But after this errors that appeared in application are logged to 'stderr.log' file. When I have used Tomcat6 errors and output were logged to 'stdout.log' file. So I was able to see every information I need in one(stdout.log) file.

How to 'tell' Tomcat7 to log errors and output to 'stdout.log' file as it was in Tomcat6?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

If you're referring to webapp logging, webapps should not be logging to either stdout or stderr. Use a "real" logger such as the java.util.log (JULI) logger and define each webapp's logger as part of the webapp itself.

For Tomcat's own server event logging, purposes, several loggers apply. Most useful is the catalina.out file, which, in fact usually contains a redirect of the Tomcat JVM's own internal System.out and System.err streams, among other things.

Tomcat's exact logging channels are configurable and for certain type of Tomcat configurations, may not use catalina.out, especially on some of the Windows versions.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
wood burning stoves
 
subject: Tomcat redirect 'stderr' content to 'stdout'
 
Similar Threads
Error with Eclipse Galileo+Tomcat plugin
Problem with @Resource annotation (without web.xml)
Tomcat STDOUT file
Problem in building project using Ant build tool
System.out.println in Tomcat