nerves_runtime v0.11.1 Nerves.Runtime.Log.SyslogParser View Source
Functions for parsing syslog strings
Link to this section Summary
Functions
Decode a syslog priority to facility and severity
Parse out the syslog facility, severity, and message (including the timestamp and host) from a syslog-formatted string.
Convert severity to an Elixir logger level
Link to this section Types
Link to this type
facility()
View Sourcefacility() :: :kernel | :user_level | :mail | :system | :security_authorization | :syslogd | :line_printer | :network_news | :UUCP | :clock | :security_authorization | :FTP | :NTP | :log_audit | :log_alert | :clock | :local0 | :local1 | :local2 | :local3 | :local4 | :local5 | :local6 | :local7
Link to this type
severity()
View Sourceseverity() :: :alert | :critical | :debug | :emergency | :error | :informational | :notice | :warning
Link to this section Functions
Decode a syslog priority to facility and severity
Parse out the syslog facility, severity, and message (including the timestamp and host) from a syslog-formatted string.
The message is of the form:
<pri>message
pri
is an integer that when broken apart gives you a facility and severity.
message
is everything else.
Link to this function
severity_to_logger(severity)
View Sourceseverity_to_logger(severity()) :: Logger.level()
Convert severity to an Elixir logger level