File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat redirect Watch "Tomcat redirect New topic

Tomcat redirect 'stderr' content to 'stdout'

Oleksander Tovstonog

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: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Tomcat redirect 'stderr' content to 'stdout'
It's not a secret anymore!