Skip to main content

parse_line

Function parse_line 

Source
pub fn parse_line(line: &str, format: &InputFormat) -> Option<EventInputDecoded>
Expand description

Parse a raw log line using the specified format.

Returns None if:

  • the line is empty or whitespace-only,
  • InputFormat::Json and the line is not valid JSON, or
  • InputFormat::Cef and the line is not valid CEF.

For InputFormat::Auto, invalid JSON falls through to syslog or plain text (never returns None for non-empty lines).