tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: RE : RE : Get rid of socket write error
Date Thu, 24 Jul 2003 15:41:28 GMT

It's a strange requirement at best to not log the stack trace of
internal tomcat exceptions.  The stack trace is a crucial element in
tracing and debugging problems.

>>> you need a way to trap exceptions thrown by Tomcat outside
>> of
>> an application Context?
>> Yeah... I should have entitled that post "Catching Tomcat's Inner
>> Exceptions" ;)
>> I searched around a bit, talked with other developers who know Tomcat
>> much better than I do, and no one seems to having found a solution.
>> After all everything works fine besides, so everyone just doesn't
>> maybe.
>> I think I should do the same ^^
>> The only "solution" that came to my mind was to try to modifiy Tomcat
>> sources. But the problem isn't big enough to justify such a thing.

How would you even modify the sources?  To not log the stack trace when
an exception occurs?  That would never make it into a tomcat build, as
every committer would -1 it ;)

Perhaps a modification could be made where tomcat doesn't log to
Catalina.out, but to another file.  In fact, the tomcat 5 final will use
commons-logging internally throughout, so you'll have more control over
where the log files go.  (But of course the stack trace will still be

The more fundamental issue here is that you're getting an exception and
a stack trace every 10 lines in the log.  You need to find the cause of
that exception and fix it.

And after that, tell your devs to stop using System.out/System.err ;)
We have a lot of systems running tomcat in production, and all we ever
see in catalina.out are the "Starting service ..." and "Stopping service
... " log lines.  Everything else goes in the app logs (we use log4j
throughout), or in case of tomcat errors in the Logger for that context
that generates the error.

Yoav Shapira

This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.

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

View raw message