org.jppf.logging.log4j
Class JmxAppender

java.lang.Object
  extended by org.apache.log4j.AppenderSkeleton
      extended by 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
JmxAppender()
          Initialize this appender.
 
Method Summary
protected  void append(org.apache.log4j.spi.LoggingEvent event)
          Append the specified event to the logger.
 void close()
          Close this appender.
 String getMbeanName()
          Get the name of the mbean that sends messages as JMX notifications.
 boolean requiresLayout()
          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 Detail

JmxAppender

public JmxAppender()
Initialize this appender.

Method Detail

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.


Copyright © 2005-2010 JPPF Team.