Package chapters.appenders
Class CountingConsoleAppender
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.AppenderBase<ILoggingEvent>
-
- chapters.appenders.CountingConsoleAppender
-
- All Implemented Interfaces:
Appender<ILoggingEvent>,ContextAware,FilterAttachable<ILoggingEvent>,LifeCycle
public class CountingConsoleAppender extends AppenderBase<ILoggingEvent>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intcounter(package private) static intDEFAULT_LIMIT(package private) Layout<ILoggingEvent>layout(package private) intlimit-
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 Constructor Description CountingConsoleAppender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(ILoggingEvent event)Layout<ILoggingEvent>getLayout()intgetLimit()voidsetLayout(Layout<ILoggingEvent> layout)voidsetLimit(int limit)voidstart()-
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 Detail
-
DEFAULT_LIMIT
static int DEFAULT_LIMIT
-
counter
int counter
-
limit
int limit
-
layout
Layout<ILoggingEvent> layout
-
-
Method Detail
-
setLimit
public void setLimit(int limit)
-
getLimit
public int getLimit()
-
start
public void start()
- Specified by:
startin interfaceLifeCycle- Overrides:
startin classAppenderBase<ILoggingEvent>
-
append
public void append(ILoggingEvent event)
- Specified by:
appendin classAppenderBase<ILoggingEvent>
-
getLayout
public Layout<ILoggingEvent> getLayout()
-
setLayout
public void setLayout(Layout<ILoggingEvent> layout)
-
-