org.apache.logging.log4j.core.appender.jms
Class JmsQueueAppender
java.lang.Object
org.apache.logging.log4j.core.AbstractLifeCycle
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
org.apache.logging.log4j.core.appender.jms.JmsQueueAppender
- All Implemented Interfaces:
- Appender, Filterable, LifeCycle
@Plugin(name="JMSQueue",
category="Core",
elementType="appender",
printObject=true)
public final class JmsQueueAppender
- extends AbstractAppender
Appender to write to a JMS Queue.
Method Summary |
void |
append(LogEvent event)
Actual writing occurs here. |
static JmsQueueAppender |
createAppender(String name,
String factoryName,
String providerURL,
String urlPkgPrefixes,
String securityPrincipalName,
String securityCredentials,
String factoryBindingName,
String queueBindingName,
String userName,
String password,
Layout<? extends Serializable> layout,
Filter filter,
String ignore)
Create a JmsQueueAppender. |
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle |
getState, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping |
append
public void append(LogEvent event)
- Actual writing occurs here.
- Parameters:
event
- The LogEvent.
createAppender
@PluginFactory
public static JmsQueueAppender createAppender(@PluginAttribute(value="name")
String name,
@PluginAttribute(value="factoryName")
String factoryName,
@PluginAttribute(value="providerURL")
String providerURL,
@PluginAttribute(value="urlPkgPrefixes")
String urlPkgPrefixes,
@PluginAttribute(value="securityPrincipalName")
String securityPrincipalName,
@PluginAttribute(value="securityCredentials")
String securityCredentials,
@PluginAttribute(value="factoryBindingName")
String factoryBindingName,
@PluginAttribute(value="queueBindingName")
String queueBindingName,
@PluginAttribute(value="userName")
String userName,
@PluginAttribute(value="password")
String password,
@PluginElement(value="Layout")
Layout<? extends Serializable> layout,
@PluginElement(value="Filter")
Filter filter,
@PluginAttribute(value="ignoreExceptions")
String ignore)
- Create a JmsQueueAppender.
- Parameters:
name
- The name of the Appender.factoryName
- The fully qualified class name of the InitialContextFactory.providerURL
- The URL of the provider to use.urlPkgPrefixes
- A colon-separated list of package prefixes for the class name of the factory class that
will create a URL context factorysecurityPrincipalName
- The name of the identity of the Principal.securityCredentials
- The security credentials of the Principal.factoryBindingName
- The name to locate in the Context that provides the QueueConnectionFactory.queueBindingName
- The name to use to locate the Queue.userName
- The user ID to use to create the Queue Connection.password
- The password to use to create the Queue Connection.layout
- The layout to use (defaults to SerializedLayout).filter
- The Filter or null.ignore
- If "true"
(default) exceptions encountered when appending events are logged; otherwise
they are propagated to the caller.
- Returns:
- The JmsQueueAppender.
Copyright © 1999-2014 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.