Grace Software
JavaLog
$Revision: 1.1 $
$Date: 2000/02/02 14:34:23 $
|
The transition to this expression based filtering may span multiple JavaLog releases. Currently, the per handler filtering is implemented but the global filtering may not make it to the current release.
Note, this functionality is currently experimental and evolving so be patient. Only part of this functionality is currently working. The rest of this document may describe functionality that is not currently implemented.
$ java -Dlog.handler.out.filter=filter-expression MyClassWhen the filter property is specified, a special FilterQueueHandler is installed as a filter before the specified handler. So, events that pass the given filter-expression are then passed to the actual requested handler.
expr: op-expr | or-expr | and-expr | sub-expr | not-expr or-expr: expr '|' expr and-expr: expr '&' expr sub-expr: '(' expr ')' unary-expr: unary-operator expr binary-expr: name binary-operator value binary-operator: '=' | '~' | '>' | '<' unary-opertor: '!' name: function # concated class.function | type # error, warning, trace, etc. | line # line number | message | object.type | object.name | exception.message value: string | integer
$ java -Dlog.handler.out.filter= "(type=error | type=warning) & function ~ grace.log.*" MyClassThis expression will filter the standard out so only errors and warnings from the grace.log package would be logged to standard output. Note that all whitespace is ignored.