de.unkrig.commons.util.logging.filter
Class ByExpressionFilter
java.lang.Object
de.unkrig.commons.util.logging.filter.ByExpressionFilter
- All Implemented Interfaces:
- java.util.logging.Filter
public class ByExpressionFilter
- extends java.lang.Object
- implements java.util.logging.Filter
A Filter that filters LogRecords by an ".condition" property like
method == "foo" && message =~ ".*bla.*"
The following variables are supported:
| Name | Contents |
name | The logger's name |
message | The log message (before parameter substitution) |
class | The fully qualified name of the logged class |
method | The name of the logged method |
level | The log level name |
parameter0,
parameter1, ... | Parameter #0, #1, ... |
- See Also:
ExpressionEvaluator
|
Method Summary |
boolean |
isLoggable(java.util.logging.LogRecord record)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByExpressionFilter
public ByExpressionFilter()
throws ParseException
- Zero-args constructor for the log manager.
- Throws:
ParseException
ByExpressionFilter
public ByExpressionFilter(java.lang.String propertyNamePrefix)
throws ParseException
- One-arg constructor for proxies
- Throws:
ParseException
ByExpressionFilter
public ByExpressionFilter(Expression condition)
- See Also:
ByExpressionFilter
isLoggable
public boolean isLoggable(java.util.logging.LogRecord record)
- Specified by:
isLoggable in interface java.util.logging.Filter