com.jamonapi.log4j
Class Log4jMonKey

java.lang.Object
  extended by com.jamonapi.MonKeyImp
      extended by com.jamonapi.log4j.Log4jMonKey
All Implemented Interfaces:
MonKey, MonKeyItem

public class Log4jMonKey
extends MonKeyImp

MonKey used to put log4j records into jamon hashmap. It is the same as MonKeyImp except it also carries with it a log4j LoggingEvent. This is not used as part of the key, but is used to display log4j info in any BufferListeners this object has. To take maximum advantage of the data in the LoggingEvent of this key use a Log4jBufferListener for log4j JAMon monitors. A regular FIFO buffer can also be used, however all info in the LoggingEvent won't be used in this case.

Author:
steve souza

Field Summary
 
Fields inherited from interface com.jamonapi.MonKey
LABEL_HEADER, UNITS_HEADER
 
Constructor Summary
Log4jMonKey(java.lang.String summaryLabel, java.lang.String detailLabel, java.lang.String units, org.apache.log4j.spi.LoggingEvent event)
          Constructor for building jamon key for log4j
 
Method Summary
 org.apache.log4j.spi.LoggingEvent getLoggingEvent()
          Return the log4j LoggingEvent object that is part of this key
 java.lang.Object getValue(java.lang.String key)
          Returns any object that has a named key.
 
Methods inherited from class com.jamonapi.MonKeyImp
equals, getBasicHeader, getBasicRowData, getDetails, getDisplayHeader, getHeader, getLabel, getParam, getRangeKey, getRowData, getRowDisplayData, getUnits, hashCode, setDetails, setParam, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Log4jMonKey

public Log4jMonKey(java.lang.String summaryLabel,
                   java.lang.String detailLabel,
                   java.lang.String units,
                   org.apache.log4j.spi.LoggingEvent event)
Constructor for building jamon key for log4j

Method Detail

getLoggingEvent

public org.apache.log4j.spi.LoggingEvent getLoggingEvent()
Return the log4j LoggingEvent object that is part of this key


getValue

public java.lang.Object getValue(java.lang.String key)
Returns any object that has a named key. For this object 'label' and 'units', and 'LoggingEvent' are valid. It is case insenstive.

Specified by:
getValue in interface MonKey
Overrides:
getValue in class MonKeyImp