Crate syslog_loose

source ·

Structs

Enums

  • Syslog facilities. Taken From RFC 5424, but I’ve heard that some platforms mix these around. Names are from Linux.
  • Syslog Severities from RFC 5424.
  • Used to specify which variant of the RFC message we are expecting.

Functions

  • The pri field is composed of both the facility and severity values. The first byte is the Severity, the remaining are the Facility.
  • Parses the message. For messages where the timestamp doesn’t specify a year it just takes the current year.
  • Parse the message.
  • Parse the message exactly. If it can’t be parsed, an Error is returned. Note, since it is hard to locate exactly what is causing the error due to the parser trying so many different combinations, a simple hardcoded string is returned as the error message.
  • Parse the message exactly. If it can’t be parsed, an Error is returned. Note, since it is hard to locate exactly what is causing the error due to the parser trying so many different combinations, a simple hardcoded string is returned as the error message.
  • Parse the message.

Type Aliases

  • An incomplete date is a tuple of (month, date, hour, minutes, seconds)