logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: [ThrowableClassMatchFilter] RE: Sandbox problems
Date Tue, 09 Dec 2003 16:25:21 GMT

Howdy,
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


>-----Original Message-----
>From: Ceki Gülcü [mailto:ceki@qos.ch]
>Sent: Tuesday, December 09, 2003 11:16 AM
>To: Log4J Developers List
>Subject: RE: [ThrowableClassMatchFilter] RE: Sandbox problems
>
>
>Yoav, I see your point although my question was more directed at you.
>Do you use ThrowableClassMatchFilter ? Can you think of a case where it
>could be useful?
>
>At 10:59 AM 12/9/2003 -0500, you wrote:
>
>>Howdy,
>>This illustrates one of the fundamental issues of the sandbox (not just in
>>log4j, it's more general), which is the circular argument of "no one knows
>>about it if it's in the sandbox -> no one uses it -> no one can say 'I use
>>this' -> it gets removed from the sandbox" ...
>>
>>Not that I particularly care for this one, I'm just in a musing mood...
>>
>>Yoav Shapira
>>Millennium ChemInformatics
>>
>>
>> >-----Original Message-----
>> >From: Ceki Gülcü [mailto:ceki@qos.ch]
>> >Sent: Tuesday, December 09, 2003 10:46 AM
>> >To: Log4J Developers List
>> >Subject: Re: [ThrowableClassMatchFilter] RE: Sandbox problems
>> >
>> >
>> >Who finds this filter useful?
>> >
>> >If no one is interested we can safely throw it away.
>> >
>> >At 10:35 AM 12/9/2003 -0500, Shapira, Yoav wrote:
>> >
>> >>Hi,
>> >>Well, the ThrowableClassMatchFilter relied directly on the getThrowable
>> >>method of org.apache.log4j.spi.ThrowableInformation ;)  Given that this
>> >>method is gone for good, we have two choices:
>> >>- Discard the ThrowableClassMatchFilter altogether
>> >>- Add a getThrowableClassName or getThrowableClass method to
>> >>ThrowableInformation and attempt to make the ThrowableClassMatchFilter
>> >>work with this method instead of getThrowable.  I think I can make it
>work
>> >>this way.
>> >>
>> >>I added this filter a few months ago because it was such and easy
>feature
>> >>that I think has considerable real-world value.  But given that it's in
>> >>the sandbox, we can safely assume only a few people know about it and
>even
>> >>fewer have used it, so we can discard it if we want ;)
>> >>
>> >>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
>>
>>
>>
>>
>>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: log4j-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: log4j-dev-help@jakarta.apache.org
>
>--
>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




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: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Mime
View raw message