[ACCEPTED]-How to configure logs/catalina.out of tomcat 6 for per-app. (Configure web-app specific log file for sys.out, sys.err)-stdout
Accepted answer
Try this,
- Each application must use its own log4j. You can achieve this by placing log4j.jar in WEB-INF/lib of each application.
- In each log4j's configuration file (default location is WEB-INF/classes), specify the log file name, e.g.
log4j.appender.AppLog.File=${catalina.home}/logs/app1.log
. - Add
swallowOutput="true"
for each context so stdout, stderr will go to your own log.
We do this on Tomcat 5.5 but I 2 think it should work on 6.0 also.
EDIT: Here 1 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>
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.