Log4j 1.0.4

org.apache.log4j.net
Class JMSAppender

java.lang.Object
  |
  +--org.apache.log4j.AppenderSkeleton
        |
        +--org.apache.log4j.net.JMSAppender
All Implemented Interfaces:
Appender, OptionHandler

public class JMSAppender
extends AppenderSkeleton

A simple appender based on JMS.

Author:
Ceki Gülcü

Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold, THRESHOLD_OPTION
 
Constructor Summary
JMSAppender()
           
 
Method Summary
 void activateOptions()
          Derived appenders should override this method if option structure requires it.
 void append(LoggingEvent event)
          Subclasses of AppenderSkeleton should imlement this method to perform actual logging.
protected  boolean checkEntryConditions()
           
 void close()
          Release any resources allocated within the appender such as file handles, network connections, etc.
 String[] getOptionStrings()
          Returns the string array {AppenderSkeleton.THRESHOLD_OPTION}.
protected  Object lookup(javax.naming.Context ctx, String name)
           
 boolean requiresLayout()
          Configurators call this method to determine if the appender requires a layout.
 void setOption(String key, String value)
          Configurable Appenders should override this method if they admit additional options.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFirstFilter, getName, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSAppender

public JMSAppender()
Method Detail

lookup

protected Object lookup(javax.naming.Context ctx,
                        String name)
                 throws javax.naming.NamingException

activateOptions

public void activateOptions()
Description copied from class: AppenderSkeleton
Derived appenders should override this method if option structure requires it.
Overrides:
activateOptions in class AppenderSkeleton

checkEntryConditions

protected boolean checkEntryConditions()

close

public void close()
Description copied from interface: Appender
Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.


append

public void append(LoggingEvent event)
Description copied from class: AppenderSkeleton
Subclasses of AppenderSkeleton should imlement this method to perform actual logging. See also AppenderSkeleton.doAppend method.
Overrides:
append in class AppenderSkeleton

getOptionStrings

public String[] getOptionStrings()
Description copied from class: AppenderSkeleton
Returns the string array {AppenderSkeleton.THRESHOLD_OPTION}.

Configurable Appenders must override this method to return the additional options they accept.

Overrides:
getOptionStrings in class AppenderSkeleton

setOption

public void setOption(String key,
                      String value)
Description copied from class: AppenderSkeleton
Configurable Appenders should override this method if they admit additional options. All classes derived from AppenderSkeleton admit the Threshold option, that is the value of the string constant AppenderSkeleton.THRESHOLD_OPTION. See AppenderSkeleton.setThreshold(org.apache.log4j.Priority) method for the meaning of this option.
Overrides:
setOption in class AppenderSkeleton

requiresLayout

public boolean requiresLayout()
Description copied from interface: Appender
Configurators call this method to determine if the appender requires a layout. If this method returns true, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returns false, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..

In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return true.


Log4j 1.0.4

Please notify me about new log4j releases.