vassim1977
asked on
Configuring Tomcat 5.5 to redirect stdout and stderr to the web application’s log file
What are the steps in configuring Tomcat 5.5 to redirect stdout and stderr to the web application’s log file? Please provide detailed steps and a working configuration
The cleaner way would be to use log4j or any logger api and use those API's in your application for logging.
This way you can clearly separate out the tomcat logging and the application logging.
This way you can clearly separate out the tomcat logging and the application logging.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you create a PrintStream implementation which redirects output to your application log, and use it in setOut and setErr it will take away the messages from catalina.out and print them to your log.
Of course, if you want, you can always print the to both by having your implementation print the data both to your application log and to the original System.out and System.err