logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject RE: [ThrowableClassMatchFilter] RE: Sandbox problems
Date Tue, 09 Dec 2003 16:42:26 GMT

Given that the throwable instance is no longer available, I think it will 
be far more efficient to add the check in your code instead of relying on a 
filter bound to be slow.

At 11:25 AM 12/9/2003 -0500, Shapira, Yoav wrote:

>I don't use it myself at this point because it's not part of the core 
>distribution.  The use-case I have in mind for this filter is that of 
>expected errors that you don't want to log.
>Specifically, we have a math library that we ask to calculate all sorts of 
>functions for us on sets of data.  This library throws some of its own 
>exceptions (InconsistentDataException, etc.), but we access it through a 
>façade that throws Exception, and in addition the library throws NPEs 
>sometimes, so our code is like
>try {
>   ... call façade method ...
>} catch (Exception e) {
>   ... log exception ...
>If the exception is one from the math library, I don't want it logged.  So 
>I would configure a ThrowableClassMatchFilter with the math library's 
>exception class.  I'd prefer this to adding the math libraries' throwable 
>class names to my own code.
>That's it ;)
>Yoav Shapira
>Millennium ChemInformatics

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  

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

View raw message