public class AsyncCoalescingStatisticsAppender
extends org.apache.log4j.AppenderSkeleton
implements org.apache.log4j.spi.AppenderAttachable
Modifier and Type | Class and Description |
---|---|
protected static class |
AsyncCoalescingStatisticsAppender.ShutdownHook |
Constructor and Description |
---|
AsyncCoalescingStatisticsAppender() |
Modifier and Type | Method and Description |
---|---|
void |
activateOptions() |
void |
addAppender(org.apache.log4j.Appender appender) |
protected void |
append(org.apache.log4j.spi.LoggingEvent event) |
void |
close() |
Enumeration |
getAllAppenders() |
org.apache.log4j.Appender |
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.
|
long |
getShutdownWaitMillis()
The ShutdownWaitMillis option represents the length of time, in milliseconds,
that the appender should wait after the logging system shutdown commences, before forcibly
clearing asynchronous logging queues and interrupting the background queue-processing thread.
|
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(org.apache.log4j.Appender appender) |
boolean |
isCreateRollupStatistics()
The CreateRollupStatistics option is used to determine whether "rollup" statistics should be created.
|
protected GenericAsyncCoalescingStatisticsAppender |
newGenericAsyncCoalescingStatisticsAppender()
Creates the new GenericAsyncCoalescingStatisticsAppender that this instance will wrap.
|
void |
removeAllAppenders() |
void |
removeAppender(org.apache.log4j.Appender appender) |
void |
removeAppender(String name) |
boolean |
requiresLayout() |
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 |
setShutdownWaitMillis(long shutdownWaitMillis)
Sets the value of the ShutdownWaitMillis option.
|
void |
setStopWatchParserClassName(String stopWatchParserClassName)
Sets the value of the StopWatchParserClassName option.
|
void |
setTimeSlice(long timeSlice)
Sets the value of the TimeSlice option.
|
public long getTimeSlice()
public void setTimeSlice(long timeSlice)
timeSlice
- The new TimeSlice option, in milliseconds.public long getShutdownWaitMillis()
public void setShutdownWaitMillis(long shutdownWaitMillis)
shutdownWaitMillis
- The new ShutdownWaitMillis 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 org.apache.log4j.Appender
setName
in class org.apache.log4j.AppenderSkeleton
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
activateOptions
in class org.apache.log4j.AppenderSkeleton
public int getNumDiscardedMessages()
public void addAppender(org.apache.log4j.Appender appender)
addAppender
in interface org.apache.log4j.spi.AppenderAttachable
public Enumeration getAllAppenders()
getAllAppenders
in interface org.apache.log4j.spi.AppenderAttachable
public org.apache.log4j.Appender getAppender(String name)
getAppender
in interface org.apache.log4j.spi.AppenderAttachable
public boolean isAttached(org.apache.log4j.Appender appender)
isAttached
in interface org.apache.log4j.spi.AppenderAttachable
public void removeAllAppenders()
removeAllAppenders
in interface org.apache.log4j.spi.AppenderAttachable
public void removeAppender(org.apache.log4j.Appender appender)
removeAppender
in interface org.apache.log4j.spi.AppenderAttachable
public void removeAppender(String name)
removeAppender
in interface org.apache.log4j.spi.AppenderAttachable
protected void append(org.apache.log4j.spi.LoggingEvent event)
append
in class org.apache.log4j.AppenderSkeleton
public boolean requiresLayout()
requiresLayout
in interface org.apache.log4j.Appender
requiresLayout
in class org.apache.log4j.AppenderSkeleton
public void close()
close
in interface org.apache.log4j.Appender
close
in class org.apache.log4j.AppenderSkeleton
protected GenericAsyncCoalescingStatisticsAppender newGenericAsyncCoalescingStatisticsAppender()
Copyright © 2008–2015 jperf. All rights reserved.