下面列出了怎么用org.apache.log4j.spi.TriggeringEventEvaluator的API类实例代码及写法,或者点击链接到github查看源代码。
/**
The <b>EvaluatorClass</b> option takes a string value
representing the name of the class implementing the {@link
TriggeringEventEvaluator} interface. A corresponding object will
be instantiated and assigned as the triggering event evaluator
for the SMTPAppender.
*/
public
void setEvaluatorClass(String value) {
evaluator = (TriggeringEventEvaluator)
OptionConverter.instantiateByClassName(value,
TriggeringEventEvaluator.class,
evaluator);
}
/**
* Sets triggering evaluator.
* @param trigger triggering event evaluator.
* @since 1.2.15
*/
public final void setEvaluator(final TriggeringEventEvaluator trigger) {
if (trigger == null) {
throw new NullPointerException("trigger");
}
this.evaluator = trigger;
}