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
    Constructor
    Description
    Initialize this appender.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    append(org.apache.log4j.spi.LoggingEvent event)
    Append the specified event to the logger.
    void
    Close this appender.
    Get the name of the mbean that sends messages as JMX notifications.
    boolean
    Determines whether a layout is required.
    void
    setMbeanName(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

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      append in class org.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

      public String getMbeanName()
      Get the name of the mbean that sends messages as JMX notifications.
      Returns:
      the mbean name as a string.
    • setMbeanName

      public void setMbeanName(String mbeanName)
      Set the name of the mbean that sends messages as JMX notifications.
      Parameters:
      mbeanName - the mbean name as a string.