Requirement is this ...
We have our 3 web-applications deployed in RHEL-5 server, we deployed apps with tomcat 6.0.16. We want to configure stdout, stderr, which are coming in tomcat/logs/catalina.out in app specific log file like,
tomcat/logs/app1.log tomcat/logs/app2.log tomcat/logs/app3.log
we are using log4j, but it is only generating logging details we need stdout per-app which is coming in tomcat/logs/catalina.out
Any Help Appreciated ...
By default, the catalina. out file is located in the logs directory under Tomcat's root directory. For example, /opt/netiq/idm/apps/tomcat/logs/catalina.
Try this,
log4j.appender.AppLog.File=${catalina.home}/logs/app1.log
.swallowOutput="true"
for each context so stdout, stderr will go to your own log.We do this on Tomcat 5.5 but I think it should work on 6.0 also.
EDIT: Here is our META-INF/context.xml,
<?xml version="1.0" encoding="UTF-8"?> <Context override="true" swallowOutput="true" useNaming="false"> <WatchedResource>WEB-INF/web.xml</WatchedResource> <Manager pathname=""/> </Context>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With