I've contributed an ExpressionFilter here: 
http://cvs.apache.org/viewcvs.cgi/jakarta-log4j/src/java/org/apache/log4j/varia/ExpressionFilter.java?rev=1.1&view=auto
 - which may provide much of the capabilities the specialized filters provided..

All of the event fields are accessible via keywords and most of the operators you'd 
expect are supported - this same expression mechanism is how colorization and display 
filtering is now done in Chainsaw v2.

See 
http://cvs.apache.org/viewcvs.cgi/jakarta-log4j/src/java/org/apache/log4j/chainsaw/rule/
 to see what rules are supported.  The RuleFactory class shows what symbols map to the 
individual rules.

There's an ORO regexp operator (LIKE), a partial text operator (~=), an EXISTS 
operator, and the other operators you'd expect: !=, ==, >, >=, <, <=, !

You can also define precedence using parens and group expressions with && (and) and || 
(or).

By the way, if you like to define expressions in postfix instead of infix, there's a 
param on the filter for supporting that.

Opinions?

Scott





-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 09, 2003 8: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:[EMAIL PROTECTED]
> >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: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to