tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: System.out.prinln in a bean
Date Sat, 01 Feb 2003 08:43:28 GMT

On Sat, 1 Feb 2003, Bill Barker wrote:

> Filip is correct.  I'm only replying to say that using System.out is evil.
> Save yourself a lot of headaches down the road, and use a real logging
> system like log4j/JDK1.4-logging/commons-logging.  Just my $0.02.

I totally agree with Bill on this recommendation.

I've written and/or maintain a pretty fair share of Jakarta code (mostly
in Tomcat, Struts, and several of the Commons libraries), and high-quality
logging implementations have enabled me to almost never have to resort
to a debugger to figure out why something does not work.  Also, later on,
when a problem surfaces in an area where I've already got debugging and
trace log statements installed, all I have to do is tweak my log level
settings and everything I need to know to solve the problem is dumped out

The other practice that I'm becoming a fanatic about is unit testing (most
Jakarta projects use JUnit for basic unit tests, and things like Cactus
for unit tests of classess that run inside a webapp).  Unit tests are the
best way to protect your backside from changes that someone else might
make to code that you depend on.

Craig McClanahan

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

View raw message