ch.qos.logback.classic.net
Class CounterBasedEvaluator

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.classic.net.CounterBasedEvaluator
All Implemented Interfaces:
EventEvaluator, ContextAware, LifeCycle

public class CounterBasedEvaluator
extends ContextAwareBase
implements EventEvaluator

A simple EventEvaluator implementation that triggers email transmission after a given number of events occur, regardless of event level.

By default, the limit is 1024.


Field Summary
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
CounterBasedEvaluator()
           
 
Method Summary
 boolean evaluate(Object event)
           
 int getLimit()
           
 String getName()
           
 boolean isStarted()
           
 void setLimit(int limit)
           
 void setName(String name)
           
 void start()
           
 void stop()
           
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
 

Constructor Detail

CounterBasedEvaluator

public CounterBasedEvaluator()
Method Detail

evaluate

public boolean evaluate(Object event)
                 throws NullPointerException,
                        EvaluationException
Specified by:
evaluate in interface EventEvaluator
Throws:
NullPointerException
EvaluationException

getName

public String getName()
Specified by:
getName in interface EventEvaluator

setName

public void setName(String name)
Specified by:
setName in interface EventEvaluator

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle

start

public void start()
Specified by:
start in interface LifeCycle

stop

public void stop()
Specified by:
stop in interface LifeCycle

getLimit

public int getLimit()

setLimit

public void setLimit(int limit)


Copyright © 2005-2009 QOS.ch. All Rights Reserved.