Package chapters.appenders
Class CountingConsoleAppender
- All Implemented Interfaces:
Appender<ILoggingEvent>
,ContextAware
,FilterAttachable<ILoggingEvent>
,LifeCycle
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) static int
(package private) Layout
<ILoggingEvent> (package private) int
Fields inherited from class ch.qos.logback.core.AppenderBase
name, started
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
append
(ILoggingEvent event) int
getLimit()
void
setLayout
(Layout<ILoggingEvent> layout) void
setLimit
(int limit) void
start()
Methods inherited from class ch.qos.logback.core.AppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, stop, toString
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, wait, wait, wait
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
DEFAULT_LIMIT
static int DEFAULT_LIMIT -
counter
int counter -
limit
int limit -
layout
Layout<ILoggingEvent> layout
-
-
Constructor Details
-
CountingConsoleAppender
public CountingConsoleAppender()
-
-
Method Details
-
setLimit
public void setLimit(int limit) -
getLimit
public int getLimit() -
start
public void start()- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classAppenderBase<ILoggingEvent>
-
append
- Specified by:
append
in classAppenderBase<ILoggingEvent>
-
getLayout
-
setLayout
-