Package ch.qos.logback.classic.turbo
Class DuplicateMessageFilter
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.classic.turbo.TurboFilter
-
- ch.qos.logback.classic.turbo.DuplicateMessageFilter
-
- All Implemented Interfaces:
ContextAware,LifeCycle
public class DuplicateMessageFilter extends TurboFilter
See {@link http://logback.qos.ch/manual/filters.html#DuplicateMessageFilter} for details.
-
-
Field Summary
Fields Modifier and Type Field Description intallowedRepetitionsintcacheSizestatic intDEFAULT_ALLOWED_REPETITIONSThe default number of allows repetitions.static intDEFAULT_CACHE_SIZEThe default cache size.
-
Constructor Summary
Constructors Constructor Description DuplicateMessageFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterReplydecide(Marker marker, Logger logger, Level level, java.lang.String format, java.lang.Object[] params, java.lang.Throwable t)Make a decision based on the multiple parameters passed as arguments.intgetAllowedRepetitions()intgetCacheSize()voidsetAllowedRepetitions(int allowedRepetitions)The allowed number of repetitions beforevoidsetCacheSize(int cacheSize)voidstart()voidstop()-
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, getStatusManager, setContext
-
-
-
-
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
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfaceLifeCycle- Overrides:
startin classTurboFilter
-
stop
public void stop()
- Specified by:
stopin interfaceLifeCycle- Overrides:
stopin classTurboFilter
-
decide
public FilterReply decide(Marker marker, Logger logger, Level level, java.lang.String format, java.lang.Object[] params, java.lang.Throwable t)
Description copied from class:TurboFilterMake a decision based on the multiple parameters passed as arguments. The returned value should be one of,FilterReply.DENY, orFilterReply.NEUTRAL.FilterReply.ACCEPT- Specified by:
decidein classTurboFilter- 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)
-
-