org.apache.logging.log4j.core.appender.mom
Class JmsAppender

java.lang.Object
  extended by org.apache.logging.log4j.core.AbstractLifeCycle
      extended by org.apache.logging.log4j.core.filter.AbstractFilterable
          extended by org.apache.logging.log4j.core.appender.AbstractAppender
              extended by org.apache.logging.log4j.core.appender.mom.JmsAppender
All Implemented Interfaces:
Serializable, Appender, Filterable, LifeCycle

@Plugin(name="JMS",
        category="Core",
        elementType="appender",
        printObject=true)
@PluginAliases(value={"JMSQueue","JMSTopic"})
public class JmsAppender
extends AbstractAppender

Generic JMS Appender plugin for both queues and topics. This Appender replaces the previous split ones. However, configurations set up for the 2.0 version of the JMS appenders will still work.

See Also:
Serialized Form

Nested Class Summary
static class JmsAppender.Builder
           
 
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
 
Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
LOGGER
 
Constructor Summary
protected JmsAppender(String name, Filter filter, Layout<? extends Serializable> layout, boolean ignoreExceptions, JmsManager manager)
           
 
Method Summary
 void append(LogEvent event)
          Logs a LogEvent using whatever logic this Appender wishes to use.
static JmsAppender.Builder newBuilder()
           
 
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toString
 
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter, start, stop
 
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, hashCodeImpl, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.logging.log4j.core.LifeCycle
getState, isStarted, isStopped, start, stop
 

Constructor Detail

JmsAppender

protected JmsAppender(String name,
                      Filter filter,
                      Layout<? extends Serializable> layout,
                      boolean ignoreExceptions,
                      JmsManager manager)
               throws JMSException
Throws:
JMSException
Method Detail

append

public void append(LogEvent event)
Description copied from interface: Appender
Logs a LogEvent using whatever logic this Appender wishes to use. It is typically recommended to use a bridge pattern not only for the benefits from decoupling an Appender from its implementation, but it is also handy for sharing resources which may require some form of locking.

Parameters:
event - The LogEvent.

newBuilder

@PluginBuilderFactory
public static JmsAppender.Builder newBuilder()


Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.