Class RFC5424SyslogParser
java.lang.Object
org.springframework.integration.syslog.RFC5424SyslogParser
public class RFC5424SyslogParser extends Object
Parse for RFC 5424 syslog messages; when used with TCP, requires the use
of a
RFC6587SyslogDeserializer
which decodes the framing.- Since:
- 4.1.1
- Author:
- Duncan McIntyre, Gary Russell, Artem Bilan
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
RFC5424SyslogParser.Reader
protected static class
RFC5424SyslogParser.Severity
-
Field Summary
Fields Modifier and Type Field Description protected static char
NILVALUE
protected boolean
retainOriginal
protected static char
SPACE
-
Constructor Summary
Constructors Constructor Description RFC5424SyslogParser()
Construct a default parser; do not retain the original message content unless there is an error.RFC5424SyslogParser(boolean retainOriginal)
-
Method Summary
Modifier and Type Method Description protected Object
getTimestamp(RFC5424SyslogParser.Reader r)
Default implementation returns the date as a String (if present).Map<String,?>
parse(String lineArg, int octetCount, boolean shortRead)
protected Object
parseStructuredDataElements(RFC5424SyslogParser.Reader r)
Default implementation returns a list of structured data elements with no internal parsing.
-
Field Details
-
NILVALUE
protected static final char NILVALUE- See Also:
- Constant Field Values
-
SPACE
protected static final char SPACE- See Also:
- Constant Field Values
-
retainOriginal
protected final boolean retainOriginal
-
-
Constructor Details
-
RFC5424SyslogParser
public RFC5424SyslogParser()Construct a default parser; do not retain the original message content unless there is an error. -
RFC5424SyslogParser
public RFC5424SyslogParser(boolean retainOriginal)- Parameters:
retainOriginal
- when true, include the original message content intact in the map.
-
-
Method Details
-
parse
-
getTimestamp
Default implementation returns the date as a String (if present).- Parameters:
r
- the reader.- Returns:
- the timestamp.
-
parseStructuredDataElements
Default implementation returns a list of structured data elements with no internal parsing.- Parameters:
r
- the reader.- Returns:
- the structured data.
-