org.apache.logging.log4j.core.appender
Class SyslogAppender

java.lang.Object
  extended by org.apache.logging.log4j.core.filter.Filterable
      extended by org.apache.logging.log4j.core.appender.AppenderBase
          extended by org.apache.logging.log4j.core.appender.OutputStreamAppender
              extended by org.apache.logging.log4j.core.appender.SocketAppender
                  extended by org.apache.logging.log4j.core.appender.SyslogAppender
All Implemented Interfaces:
Appender, Filtering, Lifecycle

public class SyslogAppender
extends SocketAppender

The Syslog Appender.


Field Summary
 
Fields inherited from class org.apache.logging.log4j.core.appender.OutputStreamAppender
immediateFlush
 
Fields inherited from class org.apache.logging.log4j.core.appender.AppenderBase
LOGGER
 
Constructor Summary
protected SyslogAppender(String name, Layout layout, Filter filter, boolean handleException, boolean immediateFlush, AbstractSocketManager manager)
           
 
Method Summary
static SyslogAppender createAppender(String host, String portNum, String protocol, String delay, String name, String immediateFlush, String suppress, String facility, String id, String ein, String includeMDC, String mdcId, String includeNL, String appName, String msgId, String excludes, String includes, String required, String format, Filter filter, Configuration config, String charset)
          Create a SyslogAppender.
 
Methods inherited from class org.apache.logging.log4j.core.appender.SocketAppender
createAppender, createSocketManager
 
Methods inherited from class org.apache.logging.log4j.core.appender.OutputStreamAppender
append, getManager, replaceManager, start, stop
 
Methods inherited from class org.apache.logging.log4j.core.appender.AppenderBase
close, error, error, error, getHandler, getLayout, getName, isExceptionSuppressed, isStarted, setHandler, toString
 
Methods inherited from class org.apache.logging.log4j.core.filter.Filterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter, startFilter, stopFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SyslogAppender

protected SyslogAppender(String name,
                         Layout layout,
                         Filter filter,
                         boolean handleException,
                         boolean immediateFlush,
                         AbstractSocketManager manager)
Method Detail

createAppender

public static SyslogAppender createAppender(String host,
                                            String portNum,
                                            String protocol,
                                            String delay,
                                            String name,
                                            String immediateFlush,
                                            String suppress,
                                            String facility,
                                            String id,
                                            String ein,
                                            String includeMDC,
                                            String mdcId,
                                            String includeNL,
                                            String appName,
                                            String msgId,
                                            String excludes,
                                            String includes,
                                            String required,
                                            String format,
                                            Filter filter,
                                            Configuration config,
                                            String charset)
Create a SyslogAppender.

Parameters:
host - The name of the host to connect to.
portNum - The port to connect to on the target host.
protocol - The Protocol to use.
delay - The interval in which failed writes should be retried.
name - The name of the Appender.
immediateFlush - "true" if data should be flushed on each write.
suppress - "true" if exceptions should be hidden from the application, "false" otherwise. The default is "true".
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.
includeNL - If true, a newline will be appended to the end of the syslog record. The default is false.
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.
charset - The character set to use when converting the syslog String to a byte array.
Returns:
A SyslogAppender.


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.