|
||||||||||
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.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 ch.qos.logback.core.AppenderBase |
---|
layout, name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
GraphingStatisticsAppender()
|
Method Summary | |
---|---|
void |
addAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
|
protected void |
append(ch.qos.logback.classic.spi.LoggingEvent event)
|
protected StatisticsChartGenerator |
createChartGenerator()
Helper method creates a new StatisticsChartGenerator based on the options set on this appender. |
void |
detachAndStopAllAppenders()
|
boolean |
detachAppender(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
|
boolean |
detachAppender(String name)
|
void |
flush()
This flush method writes the graph, with the data that exists at the time it is calld, to any attached appenders. |
static Collection<GraphingStatisticsAppender> |
getAllGraphingStatisticsAppenders()
This static method returns an unmodifiable collection of all GraphingStatisticsAppenders that have been created. |
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> |
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(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
|
Iterator<ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent>> |
iteratorForAppenders()
|
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. |
void |
start()
|
void |
stop()
|
Methods inherited from class ch.qos.logback.core.AppenderBase |
---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getFirstFilter, getLayout, getName, isStarted, setLayout, setName, 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 |
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 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 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 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(ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.LoggingEvent> appender)
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 flush()
flush
in interface Flushable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |