ch.qos.logback.classic.turbo
Class DuplicateMessageFilter

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.classic.turbo.TurboFilter
          extended by ch.qos.logback.classic.turbo.DuplicateMessageFilter
All Implemented Interfaces:
ContextAware, LifeCycle

public class DuplicateMessageFilter
extends TurboFilter

See http://logback.qos.ch/manual/filters.html#DuplicateMessageFilter for details.

Author:
Ceki Gulcu

Field Summary
 int allowedRepetitions
           
 int cacheSize
           
static int DEFAULT_ALLOWED_REPETITIONS
          The default number of allows repetitions.
static int DEFAULT_CACHE_SIZE
          The default cache size.
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
DuplicateMessageFilter()
           
 
Method Summary
 FilterReply decide(org.slf4j.Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t)
          Make a decision based on the multiple parameters passed as arguments.
 int getAllowedRepetitions()
           
 int getCacheSize()
           
 void setAllowedRepetitions(int allowedRepetitions)
          The allowed number of repetitions before
 void setCacheSize(int cacheSize)
           
 void start()
           
 void stop()
           
 
Methods inherited from class ch.qos.logback.classic.turbo.TurboFilter
getName, isStarted, setName
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CACHE_SIZE

public static final int DEFAULT_CACHE_SIZE
The default cache size.

See Also:
Constant Field Values

DEFAULT_ALLOWED_REPETITIONS

public static final int DEFAULT_ALLOWED_REPETITIONS
The default number of allows repetitions.

See Also:
Constant Field Values

allowedRepetitions

public int allowedRepetitions

cacheSize

public int cacheSize
Constructor Detail

DuplicateMessageFilter

public DuplicateMessageFilter()
Method Detail

start

public void start()
Specified by:
start in interface LifeCycle
Overrides:
start in class TurboFilter

stop

public void stop()
Specified by:
stop in interface LifeCycle
Overrides:
stop in class TurboFilter

decide

public FilterReply decide(org.slf4j.Marker marker,
                          Logger logger,
                          Level level,
                          String format,
                          Object[] params,
                          Throwable t)
Description copied from class: TurboFilter
Make a decision based on the multiple parameters passed as arguments. The returned value should be one of FilterReply.DENY, FilterReply.NEUTRAL, or FilterReply.ACCEPT.

Specified by:
decide in class TurboFilter
Returns:

getAllowedRepetitions

public int getAllowedRepetitions()

setAllowedRepetitions

public void setAllowedRepetitions(int allowedRepetitions)
The allowed number of repetitions before

Parameters:
allowedRepetitions -

getCacheSize

public int getCacheSize()

setCacheSize

public void setCacheSize(int cacheSize)


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