org.apache.flume.source
Class SyslogUtils

java.lang.Object
  extended by org.apache.flume.source.SyslogUtils

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class SyslogUtils
extends Object


Nested Class Summary
static class SyslogUtils.SyslogStatus
           
 
Field Summary
static Integer DEFAULT_SIZE
           
static String EVENT_STATUS
           
static String KEEP_FIELDS_ALL
           
static Integer MIN_SIZE
           
static int SYSLOG_BODY_POS
           
static String SYSLOG_FACILITY
           
static int SYSLOG_HOSTNAME_POS
           
static String SYSLOG_MSG_RFC3164_0
           
static String SYSLOG_MSG_RFC5424_0
           
static String SYSLOG_PRIORITY
           
static int SYSLOG_PRIORITY_POS
           
static String SYSLOG_SEVERITY
           
static String SYSLOG_TIMESTAMP_FORMAT_RFC3164_1
           
static String SYSLOG_TIMESTAMP_FORMAT_RFC5424_1
           
static String SYSLOG_TIMESTAMP_FORMAT_RFC5424_2
           
static String SYSLOG_TIMESTAMP_FORMAT_RFC5424_3
           
static String SYSLOG_TIMESTAMP_FORMAT_RFC5424_4
           
static int SYSLOG_TIMESTAMP_POS
           
static String SYSLOG_VERSION
           
static int SYSLOG_VERSION_POS
           
 
Constructor Summary
SyslogUtils()
           
SyslogUtils(boolean isUdp)
           
SyslogUtils(Integer eventSize, Set<String> keepFields, boolean isUdp)
           
 
Method Summary
static String addFieldsToBody(Set<String> keepFields, String body, String priority, String version, String timestamp, String hostname)
           
 void addFormats(Map<String,String> formatProp)
           
static Set<String> chooseFieldsToKeep(String keepFields)
           
 Event extractEvent(org.jboss.netty.buffer.ChannelBuffer in)
           
 Integer getEventSize()
           
static boolean keepAllFields(Set<String> keepFields)
           
 void setEventSize(Integer eventSize)
           
 void setKeepFields(Set<String> keepFields)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSLOG_TIMESTAMP_FORMAT_RFC5424_2

public static final String SYSLOG_TIMESTAMP_FORMAT_RFC5424_2
See Also:
Constant Field Values

SYSLOG_TIMESTAMP_FORMAT_RFC5424_1

public static final String SYSLOG_TIMESTAMP_FORMAT_RFC5424_1
See Also:
Constant Field Values

SYSLOG_TIMESTAMP_FORMAT_RFC5424_3

public static final String SYSLOG_TIMESTAMP_FORMAT_RFC5424_3
See Also:
Constant Field Values

SYSLOG_TIMESTAMP_FORMAT_RFC5424_4

public static final String SYSLOG_TIMESTAMP_FORMAT_RFC5424_4
See Also:
Constant Field Values

SYSLOG_TIMESTAMP_FORMAT_RFC3164_1

public static final String SYSLOG_TIMESTAMP_FORMAT_RFC3164_1
See Also:
Constant Field Values

SYSLOG_MSG_RFC5424_0

public static final String SYSLOG_MSG_RFC5424_0
See Also:
Constant Field Values

SYSLOG_MSG_RFC3164_0

public static final String SYSLOG_MSG_RFC3164_0
See Also:
Constant Field Values

SYSLOG_PRIORITY_POS

public static final int SYSLOG_PRIORITY_POS
See Also:
Constant Field Values

SYSLOG_VERSION_POS

public static final int SYSLOG_VERSION_POS
See Also:
Constant Field Values

SYSLOG_TIMESTAMP_POS

public static final int SYSLOG_TIMESTAMP_POS
See Also:
Constant Field Values

SYSLOG_HOSTNAME_POS

public static final int SYSLOG_HOSTNAME_POS
See Also:
Constant Field Values

SYSLOG_BODY_POS

public static final int SYSLOG_BODY_POS
See Also:
Constant Field Values

SYSLOG_FACILITY

public static final String SYSLOG_FACILITY
See Also:
Constant Field Values

SYSLOG_SEVERITY

public static final String SYSLOG_SEVERITY
See Also:
Constant Field Values

SYSLOG_PRIORITY

public static final String SYSLOG_PRIORITY
See Also:
Constant Field Values

SYSLOG_VERSION

public static final String SYSLOG_VERSION
See Also:
Constant Field Values

EVENT_STATUS

public static final String EVENT_STATUS
See Also:
Constant Field Values

MIN_SIZE

public static final Integer MIN_SIZE

DEFAULT_SIZE

public static final Integer DEFAULT_SIZE

KEEP_FIELDS_ALL

public static final String KEEP_FIELDS_ALL
See Also:
Constant Field Values
Constructor Detail

SyslogUtils

public SyslogUtils()

SyslogUtils

public SyslogUtils(boolean isUdp)

SyslogUtils

public SyslogUtils(Integer eventSize,
                   Set<String> keepFields,
                   boolean isUdp)
Method Detail

keepAllFields

public static boolean keepAllFields(Set<String> keepFields)

chooseFieldsToKeep

public static Set<String> chooseFieldsToKeep(String keepFields)

addFieldsToBody

public static String addFieldsToBody(Set<String> keepFields,
                                     String body,
                                     String priority,
                                     String version,
                                     String timestamp,
                                     String hostname)

addFormats

public void addFormats(Map<String,String> formatProp)

extractEvent

public Event extractEvent(org.jboss.netty.buffer.ChannelBuffer in)

getEventSize

public Integer getEventSize()

setEventSize

public void setEventSize(Integer eventSize)

setKeepFields

public void setKeepFields(Set<String> keepFields)


Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.