Here is the Chainsaw tutorial html page which describes expression support:
One thing to note is it makes all fields (including properties/mdc) available in expressions, which can be pretty useful, since you can now write a regexp against any field, not just the message.
One other thing to note, I've updated the network appender in log4j 1.2 to support ZeroConf out of the box via reflection if it's available..I think that's a useful feature (Chainsaw supports it).
On Mon, Feb 6, 2012 at 10:35 AM, Scott Deboy <email@example.com> wrote:
I wouldn't mind getting rid of the implementation behind the current expression/expressionfilter support (also used in Chainsaw). Were there improvements in that area?
The expression support has some limits which I don't love - yes, you can define regexps and use relational and logical operators and grouping, but I would love to be able to have something like an 'around' operator that would work off of either of events (ten events around a warning message), and/or a time-based version (events within +- 1 minute of a warning message).Can you point me to the expression/expressionfilter support you are talking about? I don't recall seeing that in Log4j's code base. The filters I've implemented to this point are documented at http://people.apache.org/~rgoers/log4j2/manual/filters.html.Logback also supports "evaluators". I've thought about that but the only difference seems to be that Filters return ACCEPT, DENY or NEUTRAL while evaluators are boolean. If I did that I would expect that most of the logic in the current filters would be moved to an Evaluator and then the individual filters would extend an EvaluatorFilter.With all that, any ideas you have like that are certainly welcome. Take a look at the documentation and the code. My hope was to make things fairly amenable to enhancements.Ralph