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
See
}
for details.
invalid @link
{@link http://logback.qos.ch/manual/filters.html#DuplicateMessageFilter
- Author:
- Ceki Gulcu
-
Field Summary
Modifier and TypeFieldDescriptionint
int
static final int
The default number of allows repetitions.static final int
The default cache size.Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecide
(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
int
void
setAllowedRepetitions
(int allowedRepetitions) The allowed number of repetitions beforevoid
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
-
Field Details
-
DEFAULT_CACHE_SIZE
public static final int DEFAULT_CACHE_SIZEThe default cache size.- See Also:
-
DEFAULT_ALLOWED_REPETITIONS
public static final int DEFAULT_ALLOWED_REPETITIONSThe default number of allows repetitions.- See Also:
-
allowedRepetitions
public int allowedRepetitions -
cacheSize
public int cacheSize
-
-
Constructor Details
-
DuplicateMessageFilter
public DuplicateMessageFilter()
-
-
Method Details
-
start
public void start()- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classTurboFilter
-
stop
public void stop()- Specified by:
stop
in interfaceLifeCycle
- Overrides:
stop
in classTurboFilter
-
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
, orFilterReply.NEUTRAL
.FilterReply.ACCEPT
- Specified by:
decide
in 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)
-