|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
org.perf4j.logback.AsyncCoalescingStatisticsAppender
public class AsyncCoalescingStatisticsAppender
This logback Appender groups StopWatch log messages together to form GroupedTimingStatistics. At a scheduled interval the StopWatch log messages that currently exist in the buffer are pulled to create a single GroupedTimingStatistics instance that is then sent to any attached appenders.
Note that any LoggingEvents which do NOT contain StopWatch objects are discarded. Also, this appender stores logged messages in a bounded buffer before sending those messages to downstream appenders. If the buffer becomes full then subsequent logs will be discarded until the buffer has time to clear. You can access the number of discarded messages using the getNumDiscardedMessages() method.
Field Summary |
---|
Fields inherited from class ch.qos.logback.core.AppenderBase |
---|
layout, name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
AsyncCoalescingStatisticsAppender()
|
Method Summary | |
---|---|
void |
addAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> newAppender)
|
protected void |
append(ch.qos.logback.classic.spi.LoggingEvent event)
|
void |
detachAndStopAllAppenders()
|
boolean |
detachAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
|
boolean |
detachAppender(String name)
|
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> |
getAppender(String name)
|
String |
getDownstreamLogLevel()
The DownstreamLogLevel option gets the Level of the GroupedTimingStatistics LoggingEvent that is sent to downstream appenders. |
int |
getNumDiscardedMessages()
Returns the number of StopWatch messages that have been discarded due to the queue being full. |
int |
getQueueSize()
The QueueSize option is used to control the size of the internal queue used by this appender to store logged messages before they are sent to downstream appenders. |
String |
getStopWatchParserClassName()
The StopWatchParserClassName option is used to determine the class used to parse stop watch messages into StopWatch instances. |
long |
getTimeSlice()
The TimeSlice option represents the length of time, in milliseconds, of the window in which appended LoggingEvents are coalesced to a single GroupedTimingStatistics and sent to downstream appenders. |
boolean |
isAttached(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
|
boolean |
isCreateRollupStatistics()
The CreateRollupStatistics option is used to determine whether "rollup" statistics should be created. |
Iterator<ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent>> |
iteratorForAppenders()
|
protected GenericAsyncCoalescingStatisticsAppender |
newGenericAsyncCoalescingStatisticsAppender()
Creates the new GenericAsyncCoalescingStatisticsAppender that this instance will wrap. |
void |
setCreateRollupStatistics(boolean createRollupStatistics)
Sets the value of the CreateRollupStatistics option. |
void |
setDownstreamLogLevel(String downstreamLogLevel)
Sets the value of the DownstreamLogLevel option. |
void |
setName(String name)
|
void |
setQueueSize(int queueSize)
Sets the value of the QueueSize option. |
void |
setStopWatchParserClassName(String stopWatchParserClassName)
Sets the value of the StopWatchParserClassName option. |
void |
setTimeSlice(long timeSlice)
Sets the value of the TimeSlice option. |
void |
start()
|
void |
stop()
|
Methods inherited from class ch.qos.logback.core.AppenderBase |
---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getFirstFilter, getLayout, getName, isStarted, setLayout, toString |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, 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 |
Constructor Detail |
---|
public AsyncCoalescingStatisticsAppender()
Method Detail |
---|
public long getTimeSlice()
public void setTimeSlice(long timeSlice)
timeSlice
- The new TimeSlice option, in milliseconds.public String getDownstreamLogLevel()
public void setDownstreamLogLevel(String downstreamLogLevel)
downstreamLogLevel
- The new DownstreamLogLevel option.public boolean isCreateRollupStatistics()
public void setCreateRollupStatistics(boolean createRollupStatistics)
createRollupStatistics
- The new CreateRollupStatistics option.public int getQueueSize()
getNumDiscardedMessages()
method.
public void setQueueSize(int queueSize)
queueSize
- The new QueueSize option.public String getStopWatchParserClassName()
public void setStopWatchParserClassName(String stopWatchParserClassName)
stopWatchParserClassName
- The new StopWatchParserClassName option.public void setName(String name)
setName
in interface ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent>
setName
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
public void start()
start
in interface ch.qos.logback.core.spi.LifeCycle
start
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
public int getNumDiscardedMessages()
public void addAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> newAppender)
addAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
public Iterator<ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent>> iteratorForAppenders()
iteratorForAppenders
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
public ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> getAppender(String name)
getAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
public boolean isAttached(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
isAttached
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
public void detachAndStopAllAppenders()
detachAndStopAllAppenders
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
public boolean detachAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
detachAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
public boolean detachAppender(String name)
detachAppender
in interface ch.qos.logback.core.spi.AppenderAttachable<ch.qos.logback.classic.spi.LoggingEvent>
protected void append(ch.qos.logback.classic.spi.LoggingEvent event)
append
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
public void stop()
stop
in interface ch.qos.logback.core.spi.LifeCycle
stop
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.LoggingEvent>
protected GenericAsyncCoalescingStatisticsAppender newGenericAsyncCoalescingStatisticsAppender()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |