Scott, thanks for the explanation.
I suggest that you take a copy of your email and paste it into the chainsaw v2 tutorial. This would be a great improvement to what is there currently :-). Since you mentioned it, could you give an example of a coloring rule as well. Thanks again, Erwin -----Ursprüngliche Nachricht----- Von: Scott Deboy [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 2. April 2004 18:55 An: Log4J Users List Betreff: RE: chainsaw v2 filtering Glad you're trying it! My apologies that there is no documentation to speak of other than the javadocs. The == operator performs an equals check. I'd suggest either using a partial text match rule: msg ~= 'current' or a regular expression rule: msg LIKE 'Current.*' One tip: right-clicking in the 'refine focus' field (or pressing ctrl-space) will bring up a context-sensitive popup menu which can show you available operators, keywords, and in some cases the list of unique values based on your current context (if the refine focus field has the text "logger == ", then right-clicking the mouse at the end of the partial expression should pop up with a list of the available loggers. Here is a quick rundown of expression support in Chainsaw v2, which you can use to build 'refine focus' or color rules: 1. Operands and operators must be separated by spaces (I'm relying on stringtokenizer to parse the expression - I'll work on using a parser at some point) 2. Single tick marks can be used to delimit multi-word text (example: msg ~= 'my msg') 3. Parens can be used to group expressions (just remember to put spaces around them) 4. Supported field identifiers: LOGGER LEVEL CLASS FILE LINE METHOD MSG NDC EXCEPTION TIMESTAMP THREAD MDC PROP (properties) 5. To build expressions using MDC or properties, the key you're evaluating needs added after the keyword. For example, since each row provides a 'log4jid' property (used during import/export of events from Chainsaw), you could refine the display to only show rows 50 through 60 by building this expresssion: PROP.log4jid >= 50 && PROP.log4jid <= 60 6. Supported operators: == equals ~= case-insensitive partial-text match != not equals LIKE supports regular expressions EXISTS not null < <= inequality operators > >= && logical and || logical or ! logical not A couple of notes on operators: - The equality operator can be used with the LEVEL identifier, but since it's performing a .equals, you need to make sure to use uppercase for the right-hand value (LEVEL == WARN instead of LEVEL == warn) - Inequality operators are supported for Levels (LEVEL > INFO) and anything that can be converted to a numeric value. You don't have the case-sensitivity issue with inequality operators and the Level identifier that you do with the equality operator. Let me know if you have further questions, Scott -----Original Message----- From: Kloeck, Erwin [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 1:55 AM To: [EMAIL PROTECTED] Subject: chainsaw v2 filtering Hi, I have trouble getting filtering to work. I would need an example of what I have to type into the 'Refine focus on:'-field to get all entries with a message starting with e.g. 'Current heap size:' ? I tried "msg == 'Current.*' " but this did not work. Where am I going wrong? Thanks for your help. Erwin .............................. Erwin Kloeck Produktentwicklung Oestreicher + Wagner Medientechnik GmbH Frankenthaler Strasse 20 D-81539 Muenchen Fon +49 (0)89-68961 216 Fax +49 (0)89-68961 271 --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]