Package org.jppf.logging.log4j
Class JmxAppender
java.lang.Object
org.apache.log4j.AppenderSkeleton
org.jppf.logging.log4j.JmxAppender
- All Implemented Interfaces:
org.apache.log4j.Appender,org.apache.log4j.spi.OptionHandler
public class JmxAppender
extends org.apache.log4j.AppenderSkeleton
An appender that delegates message appending to a JmxLogger.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappend(org.apache.log4j.spi.LoggingEvent event) Append the specified event to the logger.voidclose()Close this appender.Get the name of the mbean that sends messages as JMX notifications.booleanDetermines whether a layout is required.voidsetMbeanName(String mbeanName) Set the name of the mbean that sends messages as JMX notifications.Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
-
Constructor Details
-
JmxAppender
public JmxAppender()Initialize this appender.
-
-
Method Details
-
append
protected void append(org.apache.log4j.spi.LoggingEvent event) Append the specified event to the logger.- Specified by:
appendin classorg.apache.log4j.AppenderSkeleton- Parameters:
event- the event to log.- See Also:
-
AppenderSkeleton.append(org.apache.log4j.spi.LoggingEvent)
-
close
public void close()Close this appender. This method does nothing.- See Also:
-
Appender.close()
-
requiresLayout
public boolean requiresLayout()Determines whether a layout is required.- Returns:
- true.
- See Also:
-
Appender.requiresLayout()
-
getMbeanName
Get the name of the mbean that sends messages as JMX notifications.- Returns:
- the mbean name as a string.
-
setMbeanName
Set the name of the mbean that sends messages as JMX notifications.- Parameters:
mbeanName- the mbean name as a string.
-