|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.AppenderSkeleton toolbox.services.util.logging.support.LoggingServiceAppender
public class LoggingServiceAppender
An Apache Log4j appender implementation to facilitate interaction with the LoggingService from the log4j logging package.
This appender will publish events to the logging service configured in the environment where this appender is used.
NOTE: This appender only supports logging Levels above Level.INFO.
This appender supports the following configuration options:
Field Summary |
---|
Fields inherited from class org.apache.log4j.AppenderSkeleton |
---|
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
Constructor Summary | |
---|---|
LoggingServiceAppender()
Default constructor. |
Method Summary | |
---|---|
void |
activateOptions()
Initialise the appender by obtaining an instance of the configured LoggingService. |
void |
append(org.apache.log4j.spi.LoggingEvent event)
Publish the given LoggingEvent to the LoggingService. |
protected boolean |
checkEntryConditions(org.apache.log4j.spi.LoggingEvent event)
Check to see whether it is possible to publish the logging event. |
void |
close()
Not implemented. |
java.lang.String |
getDetailDelim()
Return the delimiter used to split the log record into parts. |
boolean |
getLocationInfo()
Return the flag indicating whether LocationInfo must be generated. |
java.lang.String |
getRegistry()
Return the name of the Toolbox Service Registry managing the LoggingService. |
java.lang.String |
getService()
Return the name of the LoggingService Service instance that must be used. |
boolean |
requiresLayout()
This appender does not require a Layout. |
void |
setDetailDelim(java.lang.String delim)
Set the delimiter that will be used to split the log record into various parts. |
void |
setLocationInfo(boolean locationInfo)
Set flag to indicate whether LocationInfo needs to be generated. |
void |
setRegistry(java.lang.String regName)
Set the name of the Toolbox Service Registry managing the LoggingService. |
void |
setService(java.lang.String svcName)
Set the name of the LoggingService instance that must be used by this appender. |
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 |
Constructor Detail |
---|
public LoggingServiceAppender()
Method Detail |
---|
public void setRegistry(java.lang.String regName)
regName
- Name of the ServiceRegistry to use.public void setService(java.lang.String svcName)
svcName
- Name of the ServiceRegistry to use.public void setLocationInfo(boolean locationInfo)
locationInfo
- boolean indicating whether location info must
generated.public void setDetailDelim(java.lang.String delim)
delim
- String containing the delimiter.public java.lang.String getRegistry()
public java.lang.String getService()
public boolean getLocationInfo()
public java.lang.String getDetailDelim()
public void activateOptions()
activateOptions
in interface org.apache.log4j.spi.OptionHandler
activateOptions
in class org.apache.log4j.AppenderSkeleton
public void append(org.apache.log4j.spi.LoggingEvent event)
This implementation transforms the LoggingEvent into a LogMessage and publishes the LogMessage using the configured LoggingService implementation.
append
in class org.apache.log4j.AppenderSkeleton
event
- The LoggingEvent to publish.protected boolean checkEntryConditions(org.apache.log4j.spi.LoggingEvent event)
event
- The LoggingEvent to publish.
public boolean requiresLayout()
public void close()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |