org.apache.logging.log4j.core.appender
Class TLSSyslogAppender
java.lang.Object
org.apache.logging.log4j.core.filter.AbstractFilterable
org.apache.logging.log4j.core.appender.AbstractAppender
org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender
org.apache.logging.log4j.core.appender.SocketAppender
org.apache.logging.log4j.core.appender.SyslogAppender
org.apache.logging.log4j.core.appender.TLSSyslogAppender
- All Implemented Interfaces:
- Appender, Filterable, LifeCycle
public final class TLSSyslogAppender
- extends SyslogAppender
Secure Syslog Appender.
Method Summary |
static TLSSyslogAppender |
createAppender(String host,
String portNum,
SSLConfiguration sslConfig,
String delay,
String immediateFail,
String name,
String immediateFlush,
String ignore,
String facility,
String id,
String ein,
String includeMDC,
String mdcId,
String mdcPrefix,
String eventPrefix,
String includeNL,
String escapeNL,
String appName,
String msgId,
String excludes,
String includes,
String required,
String format,
Filter filter,
Configuration config,
String charsetName,
String exceptionPattern,
LoggerFields[] loggerFields,
String advertise)
Create a SyslogAppender. |
static AbstractSocketManager |
createSocketManager(SSLConfiguration sslConf,
String host,
int port,
int reconnectDelay,
boolean fail,
Layout<? extends Serializable> layout)
|
Methods inherited from class org.apache.logging.log4j.core.appender.AbstractAppender |
error, error, error, getHandler, getLayout, getName, ignoreExceptions, isStarted, parseInt, setHandler, toString |
TLSSyslogAppender
protected TLSSyslogAppender(String name,
Layout<? extends Serializable> layout,
Filter filter,
boolean ignoreExceptions,
boolean immediateFlush,
AbstractSocketManager manager,
Advertiser advertiser)
createAppender
public static TLSSyslogAppender createAppender(String host,
String portNum,
SSLConfiguration sslConfig,
String delay,
String immediateFail,
String name,
String immediateFlush,
String ignore,
String facility,
String id,
String ein,
String includeMDC,
String mdcId,
String mdcPrefix,
String eventPrefix,
String includeNL,
String escapeNL,
String appName,
String msgId,
String excludes,
String includes,
String required,
String format,
Filter filter,
Configuration config,
String charsetName,
String exceptionPattern,
LoggerFields[] loggerFields,
String advertise)
- Create a SyslogAppender.
- Parameters:
host
- The name of the host to connect to.portNum
- The port to connect to on the target host.sslConfig
- The SSL configurationdelay
- The interval in which failed writes should be retried.immediateFail
- True if the write should fail if no socket is immediately available.name
- The name of the Appender.immediateFlush
- "true" if data should be flushed on each write.ignore
- If "true"
(default) exceptions encountered when appending events are logged; otherwise
they are propagated to the caller.facility
- The Facility is used to try to classify the message.id
- The default structured data id to use when formatting according to RFC 5424.ein
- The IANA enterprise number.includeMDC
- Indicates whether data from the ThreadContextMap will be included in the RFC 5424 Syslog
record. Defaults to "true:.mdcId
- The id to use for the MDC Structured Data Element.mdcPrefix
- The prefix to add to MDC key names.eventPrefix
- The prefix to add to event key names.includeNL
- If true, a newline will be appended to the end of the syslog record. The default is false.escapeNL
- String that should be used to replace newlines within the message text.appName
- The value to use as the APP-NAME in the RFC 5424 syslog record.msgId
- The default value to be used in the MSGID field of RFC 5424 syslog records.excludes
- A comma separated list of mdc keys that should be excluded from the LogEvent.includes
- A comma separated list of mdc keys that should be included in the FlumeEvent.required
- A comma separated list of mdc keys that must be present in the MDC.format
- If set to "RFC5424" the data will be formatted in accordance with RFC 5424. Otherwise,
it will be formatted as a BSD Syslog record.filter
- A Filter to determine if the event should be handled by this Appender.config
- The Configuration.charsetName
- The character set to use when converting the syslog String to a byte array.exceptionPattern
- The converter pattern to use for formatting exceptions.loggerFields
- The logger fieldsadvertise
- Whether to advertise
- Returns:
- A TLSSyslogAppender.
createSocketManager
public static AbstractSocketManager createSocketManager(SSLConfiguration sslConf,
String host,
int port,
int reconnectDelay,
boolean fail,
Layout<? extends Serializable> layout)
Copyright © 1999-2013 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.