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
  • Field Details

    • NILVALUE

      protected static final char NILVALUE
      See Also:
    • SPACE

      protected static final char SPACE
      See Also:
    • 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

      public Map<String,?> parse(String lineArg, int octetCount, boolean shortRead)
    • getTimestamp

      protected Object getTimestamp(RFC5424SyslogParser.Reader r)
      Default implementation returns the date as a String (if present).
      Parameters:
      r - the reader.
      Returns:
      the timestamp.
    • parseStructuredDataElements

      protected Object parseStructuredDataElements(RFC5424SyslogParser.Reader r)
      Default implementation returns a list of structured data elements with no internal parsing.
      Parameters:
      r - the reader.
      Returns:
      the structured data.