commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Karasulu" <aok...@bellsouth.net>
Subject RE: Replace System.out, System.err and printStackTrace() with Commons Logging?
Date Mon, 19 Apr 2004 18:28:49 GMT
Hi Steve,

> -----Original Message-----
> From: Viens, Steve [mailto:Stephen.Viens@FMR.COM]
> 
> I've been looking through the DBCP source this morning and have noticed
> several instances where System.out, System.err and printStackTrace()
> have been used to write error or status messages to the console.
> 
> I'm wondering if there's any interest in a contribution that would
> replace these calls with calls to the commons-logging package instead?
> I'm making these changes to my own copy anyway - so I'm just curious if
> there's any interested in having them contributed back. The downside is
> that this would make DBCP dependent on the commons-logging library which
> (IMHO) is worth it I think.

PMFJI, but I think you're right on.  I've not dealt with DBCP but 
logging over writing to stderr and stdout is far better - I'd rather
have the extra dependency.  Plus take a look at the use of monitors 
verses simple logging.  It's a technique I picked up from a fellow 
named Paul Hammant.  Here's a link to something he wrote about the 
topic of using monitors (callbacks) as opposed to using logging:

http://nagoya.apache.org/wiki/apachewiki.cgi?AvalonNoLogging

To quote the wiki - "In short - this solution gives maximum flexibility, 
maximum embeddability, for no cost. 

Cheers,
Alex




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


Mime
View raw message