public class SyslogParser extends Object
| Modifier and Type | Field and Description |
|---|---|
private Charset |
charset |
static Collection<Pattern> |
MESSAGE_PATTERNS |
static int |
SYSLOG_BODY_POS |
static int |
SYSLOG_HOSTNAME_POS |
static String |
SYSLOG_MSG_RFC3164_0 |
static String |
SYSLOG_MSG_RFC5424_0 |
static int |
SYSLOG_PRIORITY_POS |
static int |
SYSLOG_TIMESTAMP_POS |
static int |
SYSLOG_VERSION_POS |
| Constructor and Description |
|---|
SyslogParser() |
SyslogParser(Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
String |
getCharsetName() |
SyslogEvent |
parseEvent(byte[] bytes,
String sender)
Parses a SyslogEvent from a byte array.
|
SyslogEvent |
parseEvent(ByteBuffer buffer)
Parses a SyslogEvent from a byte buffer.
|
SyslogEvent |
parseEvent(ByteBuffer buffer,
String sender)
Parses a SyslogEvent from a byte buffer.
|
public static final String SYSLOG_MSG_RFC5424_0
public static final String SYSLOG_MSG_RFC3164_0
public static final Collection<Pattern> MESSAGE_PATTERNS
public static final int SYSLOG_PRIORITY_POS
public static final int SYSLOG_VERSION_POS
public static final int SYSLOG_TIMESTAMP_POS
public static final int SYSLOG_HOSTNAME_POS
public static final int SYSLOG_BODY_POS
private Charset charset
public SyslogParser()
public SyslogParser(Charset charset)
public SyslogEvent parseEvent(ByteBuffer buffer)
buffer - a byte buffer containing a syslog messagepublic SyslogEvent parseEvent(ByteBuffer buffer, String sender)
buffer - a byte buffer containing a syslog messagesender - the hostname of the syslog server that sent the messagepublic SyslogEvent parseEvent(byte[] bytes, String sender)
bytes - a byte array containing a syslog messagesender - the hostname of the syslog server that sent the messagepublic String getCharsetName()
Copyright © 2021 Apache NiFi Project. All rights reserved.