public class ColorRule extends AbstractRule implements Serializable
Constructor and Description |
---|
ColorRule(String expression,
Rule rule,
Color backgroundColor,
Color foregroundColor)
Create new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(org.apache.log4j.spi.LoggingEvent event,
Map matches)
Returns true if this implementation of the rule accepts the LoggingEvent,
or false if not.
|
Color |
getBackgroundColor()
Get background color.
|
String |
getExpression()
Get expression.
|
Color |
getForegroundColor()
Get foreground color.
|
Rule |
getRule()
Get rule.
|
String |
toString() |
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
public Rule getRule()
public Color getForegroundColor()
public Color getBackgroundColor()
public String getExpression()
public boolean evaluate(org.apache.log4j.spi.LoggingEvent event, Map matches)
What True/False means can be client-specific.
evaluate
in interface Rule
event
- LoggingEvent this instance will evaluatematches
- a Map of event field keys to Sets of matching strings (may be null) which will be
updated during execution of this method to include field and string matches based on the rule
evaluation resultsCopyright © 2013 The Apache Software Foundation. All Rights Reserved.