nerves_runtime v0.10.2 Nerves.Runtime.Log.SyslogParser
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()
facility()
facility() ::
: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
facility() :: :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()
severity()
severity() ::
:alert
| :critical
| :debug
| :emergency
| :error
| :informational
| :notice
| :warning
severity() :: :alert | :critical | :debug | :emergency | :error | :informational | :notice | :warning
Link to this section Functions
Link to this function
decode_priority(priority)
Decode a syslog priority to facility and severity
Link to this function
parse(arg1)
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)
severity_to_logger(severity)
severity_to_logger(severity()) :: Logger.level()
severity_to_logger(severity()) :: Logger.level()
Convert severity to an Elixir logger level