public class JAMonAppender
extends org.apache.log4j.AppenderSkeleton
Constructor and Description |
---|
JAMonAppender() |
Modifier and Type | Method and Description |
---|---|
protected void |
append(org.apache.log4j.spi.LoggingEvent event)
If the appender is enabled then start and stop a JAMon entry.
|
void |
close()
Required log4j method.
|
boolean |
getEnableLevelMonitoring()
Returns whether or not LevelMonitoring is enabled or not.
|
boolean |
getEnableListenerDetails()
Specifies whether or not LoggingEvent info will be used in the attached
Log4jBufferListener.
|
boolean |
getGeneralize()
Return whether or not generalization will occur
|
String |
getUnits() |
boolean |
hasGeneralizer()
Indicates whether or not a Generalizer has been set
|
boolean |
requiresLayout()
JAMonAppender doesn't have to have a layount because it is acceptable to
default to using the raw message.
|
void |
setEnableDefaultGeneralizer(boolean enableDefaultGeneralizer)
Enable the use of the DefaultGeneralizer.
|
void |
setEnableLevelMonitoring(boolean enableLevelMonitoring)
Specifies whether or not there will be a JAMon record for each log4j
Level (DEBUG/WARN/...), and another one that corresponds to all calls to
log4j logging methods.
|
void |
setEnableListenerDetails(boolean arrayDetails)
Specify whether or not LoggingEvent info will be used in the attached
Log4jBufferListener
|
void |
setEnableListeners(String level)
Note this is primarily used by the log4j configurator.
|
void |
setGeneralize(boolean generalize)
Indicate whether or not a jamon record should be created from the passed in message.
|
void |
setGeneralizerClass(Generalizer generalizer)
Default generalizer based on com.jamonapi.utils.SQLDeArger.
|
void |
setGeneralizerDynamic(String generalizerClassStr)
Pass in a string class name and this generalizer will be constructed an used.
|
void |
setListenerBufferSize(int bufferSize)
For defaultBufferSize to take hold it must be called before the first
call to setDefaultListeners.
|
void |
setUnits(String units) |
protected void append(org.apache.log4j.spi.LoggingEvent event)
append
in class org.apache.log4j.AppenderSkeleton
event
- public void close()
public boolean requiresLayout()
log4j:ERROR Could not find value for key log4j.appender.jamonAppender.layout
public String getUnits()
public void setUnits(String units)
units
- The units to set.public boolean getEnableListenerDetails()
public void setEnableListenerDetails(boolean arrayDetails)
public void setEnableLevelMonitoring(boolean enableLevelMonitoring)
public boolean getEnableLevelMonitoring()
public void setEnableListeners(String level)
Note: Values are not case sensitive.
level
- public void setListenerBufferSize(int bufferSize)
bufferSize
- public void setGeneralize(boolean generalize)
generalize
- public boolean getGeneralize()
public void setEnableDefaultGeneralizer(boolean enableDefaultGeneralizer)
enableDefaultGeneralizer
- public boolean hasGeneralizer()
public void setGeneralizerClass(Generalizer generalizer)
public void setGeneralizerDynamic(String generalizerClassStr) throws InstantiationException, IllegalAccessException, ClassNotFoundException
generalizerClassStr
- InstantiationException
IllegalAccessException
ClassNotFoundException
Copyright © 2015. All rights reserved.