We know using proper logging library instead of System.out is important. But when there are a legacy application that still using the System.out and System.err, it will be good to be able to pipe it into file for troubleshooting.
The solution is set the swallowOutput="true" in Tomcat context of your webapp. Then this will pipe the stdout and stderr into the logger configured in the same context.
// shall I write some keywords here to boost search engine ranking?
Monday, September 07, 2009
Redirect Tomcat console output to log file
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment