tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svein Olav Bjerkeset <tom...@bjerkeset.com>
Subject Logging exceptions per webapp in Tomcat 5.5
Date Mon, 03 Jan 2005 08:12:19 GMT
After having read about how to setup logging in Tomcat 5.5 (http://jakarta.apache.org/tomcat/tomcat-5.5-doc/logging.html),
I have managed to set up Log4j to work with Tomcat 5.5.

However, when I set up indivdual logs for my webapps, only output generated from log statements
in the code (Log4j
statements) end up in these logs. Exceptions still end up in catalina.out (which is common
to all webapps). I would
like the exceptions to end up in the logfile belonging to the webapp that generated it.

I have tried adding the following line in my web/WEB-INF/classes/log4j.properties file without
getting the wanted result:

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mywebapp]=DEBUG,
A1

To test the logging, I have written a short JSP which just thorws an exception. 

>From what I read in the following article: http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg143230.html,
it seems that exceptions (and other output sent to stdout or stderr) can not be redirected
and will always go to
catalina.out. Is this correct or is there a way to also redirect exceptions to individual
log files basen on what
wabapp generated the exception?

Thanks in advance for any help,
Svein Olav Bjerkeset

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message