tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: [5.0] Servlet logging and error messages
Date Mon, 21 Jul 2003 14:37:41 GMT
Shapira, Yoav wrote:
> Howdy,
>>- Stripping out all the Catalina related part of the stack trace in the
>>HTML generated by the ErrorReportValve; that eases debugging.
> Hmm... As long as the full stack trace, including Catalina, is still in
> the log file, that's OK.  I know the Catalina parts of the stack trace
> frequently have <= 0 value, but I still feel better knowing the full
> stack trace is there.

The full trace of the root cause is now logged (instead of the full 
trace of the exception, which was not very useful IMO).
The new display seems to me significantly easier on users (esp when 
using the request dispatcher a lot, which could have created huge stack 
traces in the past).

>>- When an exception occurs, and it is a ServletException, I think the
>>root cause should be logged, not the external exception, which 99% of
>>the time is useless.
> What about cases where someone constructs a ServletException with a
> message, without a root cause exception?

If there's no root cause, getRootCause returns null, and the original 
exception is logged.
I have already implemented all that, so you can check with the CVS code.

>>- I strongly believe that all webapp triggered logging (init errors,
>>service errors, etc) should go to the servlet container provided logger
>>(ie Context.getLogger()). 
> Ditto, +1.

And the container messages should go to c-l.

> Curious: why is log4j not adapted / what's missing from it for this
> use-case?

Because log4j wasn't with Apache for Tomcat 4.0. Also, I believe TC's 
container logger can be configured more easily and consistently with 
other components.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message