public class ColorRule extends AbstractRule implements java.io.Serializable
Constructor and Description |
---|
ColorRule(java.lang.String expression,
Rule rule,
java.awt.Color backgroundColor,
java.awt.Color foregroundColor)
Create new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(LoggingEvent event,
java.util.Map matches)
Returns true if this implementation of the rule accepts the LoggingEvent,
or false if not.
|
java.awt.Color |
getBackgroundColor()
Get background color.
|
java.lang.String |
getExpression()
Get expression.
|
java.awt.Color |
getForegroundColor()
Get foreground color.
|
Rule |
getRule()
Get rule.
|
java.lang.String |
toString() |
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
public ColorRule(java.lang.String expression, Rule rule, java.awt.Color backgroundColor, java.awt.Color foregroundColor)
expression
- expression.rule
- rule.backgroundColor
- background color.foregroundColor
- foreground color.public Rule getRule()
public java.awt.Color getForegroundColor()
public java.awt.Color getBackgroundColor()
public java.lang.String getExpression()
public boolean evaluate(LoggingEvent event, java.util.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 resultspublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2006-2019 OPS4J - Open Participation Software for Java. All Rights Reserved.