commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [logging] are there standard logging practices?
Date Mon, 22 Jul 2002 22:36:29 GMT
>I've tended to *not* log exceptions thrown at the component level --
>especially deliberate ones like a documented IllegalArgumentException for
>invalid method parameters, but also for unplanned NPEs and such.  A
>component caller can either log the exception and swallow it, or not log
>and rethrow, as appropriate.  The potential problem with this approach, 
>course, is that nobody ever logs it -- but presumably the outer wrapper
>for your application will have suitable logic to catch and log anything
>that ripples up that far.

Hmm.. the more I think, the more I see your point for *some* situations. 
Perhaps we can draw a distinction here.. not sure how...  Some errors are 
*deep* and may have a lot of 'internal state'.  Others 
(IllegalArgumentException) are very much on the *surface*, and shouldn't 
be logged.

I'll think about that tonight.

Richard A. Sitze
IBM WebSphere WebServices Development

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

View raw message