nerves_runtime v0.9.2 Nerves.Runtime.Log.Parser

Functions for parsing syslog and kmsg strings

Link to this section Summary

Functions

Parse out the syslog facility, severity, and message (including the timestamp and host) from a syslog-formatted string

Link to this section Functions

Link to this function parse_syslog(arg1)
parse_syslog(String.t()) ::
  %{facility: atom(), severity: atom(), message: binary()}
  | {:error, :not_syslog_format}

Parse out the syslog facility, severity, and message (including the timestamp and host) from a syslog-formatted string.

The message is of the form:

message `pri` is an integer that when broken apart gives you a facility and severity. `message` is everything else.