Class ChainsawAppenderHandler
java.lang.Object
org.apache.log4j.AppenderSkeleton
org.apache.log4j.chainsaw.ChainsawAppenderHandler
- All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler
public class ChainsawAppenderHandler
extends org.apache.log4j.AppenderSkeleton
A handler class that either extends a particular appender hierarchy or can be
bound into the Log4j appender framework, and queues events, to be later
dispatched to registered/interested parties.
- Author:
- Scott Deboy <sdeboy@apache.org>, Paul Smith <psmith@apache.org>
-
Field Summary
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomEventBatchListener(String identifier, EventBatchListener l) voidvoidvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener listener) voidappend(org.apache.log4j.spi.LoggingEvent event) voidclose()doubleExposes the current Data rate calculated.intvoidvoidvoidremovePropertyChangeListener(String propertyName, PropertyChangeListener listener) booleanvoidsetIdentifierExpression(String identifierExpression) voidsetQueueInterval(int interval) Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
-
Constructor Details
-
ChainsawAppenderHandler
-
ChainsawAppenderHandler
public ChainsawAppenderHandler()
-
-
Method Details
-
setIdentifierExpression
-
getIdentifierExpression
-
addCustomEventBatchListener
public void addCustomEventBatchListener(String identifier, EventBatchListener l) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
addEventBatchListener
-
removeEventBatchListener
-
append
public void append(org.apache.log4j.spi.LoggingEvent event) - Specified by:
appendin classorg.apache.log4j.AppenderSkeleton
-
close
public void close() -
requiresLayout
public boolean requiresLayout() -
getQueueInterval
public int getQueueInterval() -
setQueueInterval
public void setQueueInterval(int interval) -
getDataRate
public double getDataRate()Exposes the current Data rate calculated. This is periodically updated by an internal Thread as is the number of events that have been processed, and dispatched to all listeners since the last sample period divided by the number of seconds since the last sample period.This method fires a PropertyChange event so listeners can monitor the rate
- Returns:
- double # of events processed per second
-
addPropertyChangeListener
- Parameters:
listener-
-
addPropertyChangeListener
- Parameters:
propertyName-listener-
-
removePropertyChangeListener
- Parameters:
listener-
-
removePropertyChangeListener
- Parameters:
propertyName-listener-
-