public class Log4jBufferListener extends JAMonBufferListener
This class can act as a standard JAMonBufferListener/FIFOBuffer or more interestingly if used with log4j it will put in the Buffer data that although designed to work as a Buffer that displays details unique to log4j, if the monitor does not have a Log4jMonKey, it will fallback to Standard JAMonBufferListener behaviour. This makes it so no problems exist if someone inadvertently assigns a Log4jBufferListener to a non log4j entity.
It will create details of the key details (Label (formattedMessage), LoggerName, Level, Threadname, Exception) followed by lastvalue, active, and the date of the invocation
JAMonBufferListener.HeaderInfo| Constructor and Description |
|---|
Log4jBufferListener()
Constructor that creaates this object with its default name (the class
name)
|
Log4jBufferListener(java.lang.String name)
Pass in the jamonListener name
|
Log4jBufferListener(java.lang.String name,
BufferList list)
Name the listener and pass in the jamon BufferList to use
|
| Modifier and Type | Method and Description |
|---|---|
JAMonListener |
copy()
Makes a usable copy of this BufferListener
|
DetailData |
getDetailData() |
java.lang.String[] |
getHeader()
Returns the valid header for display of this buffer
|
void |
processEvent(Monitor mon)
When this event is fired the monitor will be added to the rolling buffer.
|
protected java.lang.Object[] |
toArray(org.apache.log4j.spi.LoggingEvent event,
Monitor mon)
method that returns an array to use in the Buffer.
|
addRow, addRow, getBufferList, getDefaultHeaderInfo, getHeaderInfo, getName, getRowCount, hasData, isEmpty, setNamepublic Log4jBufferListener()
public Log4jBufferListener(java.lang.String name)
public Log4jBufferListener(java.lang.String name,
BufferList list)
public void processEvent(Monitor mon)
processEvent in interface JAMonListenerprocessEvent in class JAMonBufferListenerprotected java.lang.Object[] toArray(org.apache.log4j.spi.LoggingEvent event,
Monitor mon)
event - mon - public JAMonListener copy()
copy in interface CopyJAMonListenercopy in class JAMonBufferListenerpublic java.lang.String[] getHeader()
public DetailData getDetailData()
getDetailData in class JAMonBufferListener