tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Hartung" <wi...@msoft.com>
Subject Re: Logging exceptions per webapp in Tomcat 5.5
Date Fri, 07 Jan 2005 01:32:33 GMT
> From: "Shed Hollaway" <shed2@bellsouth.net>
> Sent: Thursday, January 06, 2005 6:59 PM

> Svein
>
> Did you ever get an answer to you question? If so, how separate the
logging
> for webapps?

The exceptions will log out to your log file if you actually bother to
capture the exceptions and log them. The exceptions bubbling to the top in
catalina.out are those that get out of your code.

Don't let them out and capture them yourself. You can try (I haven't done
this) to put a catch-all Filter at the top of your app that does nothing but

public void doFilter(ServletRequest req, ServletResponse resp, FilterChain
chain)
{
    try {
        filterChain.doFilter(request, response);
    }
    catch(Throwable t) {
        log.WARN(t);
    }
}

(making this work is left as an excercise for the reader)

Regards,

Will Hartung
(willh@msoft.com)


---------------------------------------------------------------------
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