|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.log4j.AppenderSkeleton
org.perf4j.log4j.GraphingStatisticsAppender
public class GraphingStatisticsAppender
This appender is designed to be attached to an AsyncCoalescingStatisticsAppender. It takes the incoming
GroupedTimingStatistics log messages and uses this data to update a graphical view of the logged statistics. If
ANOTHER appender is then attached to this appender then the graph URLs will be written to the appender on a scheduled
basis. Alternatively, the graph can be viewed by setting up a
GraphingServlet to expose the graph images.
| Field Summary | |
|---|---|
protected static Map<String,GraphingStatisticsAppender> |
APPENDERS_BY_NAME
This class keeps track of all appenders of this type that have been created. |
| Fields inherited from class org.apache.log4j.AppenderSkeleton |
|---|
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
| Constructor Summary | |
|---|---|
GraphingStatisticsAppender()
|
|
| Method Summary | |
|---|---|
void |
activateOptions()
|
void |
addAppender(Appender appender)
|
protected void |
append(LoggingEvent event)
|
void |
close()
|
protected StatisticsChartGenerator |
createChartGenerator()
Helper method creates a new StatisticsChartGenerator based on the options set on this appender. |
void |
flush()
This flush method writes the graph, with the data that exists at the time it is calld, to any attached appenders. |
Enumeration |
getAllAppenders()
|
static Collection<GraphingStatisticsAppender> |
getAllGraphingStatisticsAppenders()
This static method returns an unmodifiable collection of all GraphingStatisticsAppenders that have been created. |
Appender |
getAppender(String name)
|
static GraphingStatisticsAppender |
getAppenderByName(String appenderName)
This static method returns any created GraphingStatisticsAppender by its name. |
StatisticsChartGenerator |
getChartGenerator()
Gets the contained StatisticsChartGenerator that is used to generate the graphs. |
int |
getDataPointsPerGraph()
The DataPointsPerGraph option is used to specify how much data should be displayed on each graph before it is written to any attached appenders. |
String |
getGraphType()
The GraphType option is used to specify the data that should be displayed on the graph. |
String |
getTagNamesToGraph()
The TagNamesToGraph option is used to specify which tags should be logged as a data series on the graph. |
boolean |
isAttached(Appender appender)
|
void |
removeAllAppenders()
|
void |
removeAppender(Appender appender)
|
void |
removeAppender(String name)
|
boolean |
requiresLayout()
|
void |
setDataPointsPerGraph(int dataPointsPerGraph)
Sets the value of the DataPointsPerGraph option. |
void |
setGraphType(String graphType)
Sets the value of the GraphType option. |
void |
setTagNamesToGraph(String tagNamesToGraph)
Sets the value of the TagNamesToGraph option. |
| Methods inherited from class org.apache.log4j.AppenderSkeleton |
|---|
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Map<String,GraphingStatisticsAppender> APPENDERS_BY_NAME
| Constructor Detail |
|---|
public GraphingStatisticsAppender()
| Method Detail |
|---|
public String getGraphType()
public void setGraphType(String graphType)
graphType - The new value for the GraphType option.public String getTagNamesToGraph()
public void setTagNamesToGraph(String tagNamesToGraph)
tagNamesToGraph - The new value for the TagNamesToGraph option.public int getDataPointsPerGraph()
public void setDataPointsPerGraph(int dataPointsPerGraph)
dataPointsPerGraph - The new value for the DataPointsPerGraph option.public void activateOptions()
activateOptions in interface OptionHandleractivateOptions in class AppenderSkeletonprotected StatisticsChartGenerator createChartGenerator()
public StatisticsChartGenerator getChartGenerator()
public static GraphingStatisticsAppender getAppenderByName(String appenderName)
appenderName - the name of the GraphingStatisticsAppender to return
public static Collection<GraphingStatisticsAppender> getAllGraphingStatisticsAppenders()
public void addAppender(Appender appender)
addAppender in interface AppenderAttachablepublic Enumeration getAllAppenders()
getAllAppenders in interface AppenderAttachablepublic Appender getAppender(String name)
getAppender in interface AppenderAttachablepublic boolean isAttached(Appender appender)
isAttached in interface AppenderAttachablepublic void removeAllAppenders()
removeAllAppenders in interface AppenderAttachablepublic void removeAppender(Appender appender)
removeAppender in interface AppenderAttachablepublic void removeAppender(String name)
removeAppender in interface AppenderAttachableprotected void append(LoggingEvent event)
append in class AppenderSkeletonpublic boolean requiresLayout()
requiresLayout in interface AppenderrequiresLayout in class AppenderSkeletonpublic void close()
close in interface Appenderclose in class AppenderSkeletonpublic void flush()
flush in interface Flushable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||