Class YamlLogEventParser

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LogEvent parseFrom​(byte[] input)
      Parses a byte array, which is expected to contain exactly one log event.
      LogEvent parseFrom​(byte[] input, int offset, int length)
      Parses a specified range in a byte array.
      LogEvent parseFrom​(java.lang.String input)
      Parses a String, which is expected to contain exactly one log event.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • YamlLogEventParser

        public YamlLogEventParser()
    • Method Detail

      • parseFrom

        public LogEvent parseFrom​(java.lang.String input)
                           throws ParseException
        Description copied from interface: TextLogEventParser
        Parses a String, which is expected to contain exactly one log event.
        Specified by:
        parseFrom in interface TextLogEventParser
        Parameters:
        input - the string
        Returns:
        the parsed LogEvent, never null.
        Throws:
        ParseException - if the input is malformed and cannot be parsed as a LogEvent
      • parseFrom

        public LogEvent parseFrom​(byte[] input)
                           throws ParseException
        Description copied from interface: LogEventParser
        Parses a byte array, which is expected to contain exactly one log event.
        Specified by:
        parseFrom in interface LogEventParser
        Parameters:
        input - the byte array
        Returns:
        the parsed LogEvent, never null.
        Throws:
        ParseException - if the input is malformed and cannot be parsed as a LogEvent
      • parseFrom

        public LogEvent parseFrom​(byte[] input,
                                  int offset,
                                  int length)
                           throws ParseException
        Description copied from interface: LogEventParser
        Parses a specified range in a byte array. The specified range is expected to contain exactly one log event.
        Specified by:
        parseFrom in interface LogEventParser
        Parameters:
        input - the byte array
        offset - the initial offset
        length - the length
        Returns:
        the parsed LogEvent, never null.
        Throws:
        ParseException - if the input is malformed and cannot be parsed as a LogEvent