Module syslog

Main module of the syslog application.

Behaviours: application, supervisor.

Description

Main module of the syslog application. This module contains functions to send messages directly over Syslog bypassing the error_logger. Like its error_logger counterparts these functions never fail.

The logging functions have the same name than the error_logger functions making switching from one to another easy.

Data Types

datetime()

datetime() = {calendar:datetime(), non_neg_integer()}

facility()

facility() = kern | kernel | user | mail | daemon | auth | syslog | lpr | news | uucp | cron | authpriv | ftp | ntp | audit | alert | clock | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7

param_name()

param_name() = atom() | binary() | iolist()

param_value()

param_value() = atom() | binary() | iolist() | integer() | float()

proc_name()

proc_name() = atom() | pid() | string()

sd_element()

sd_element() = {sd_id(), [sd_param()]}

sd_id()

sd_id() = atom() | binary() | iolist()

sd_param()

sd_param() = {param_name(), param_value()}

severity()

severity() = emergency | alert | critical | error | warning | notice | informational | debug | crash

Function Index

debug_msg/1 Sends a message with severity debug.
debug_msg/2 Sends a format message with severity debug.
error_msg/1 Sends a message with severity error.
error_msg/2 Sends a format message with severity error.
info_msg/1 Sends a message with severity informational.
info_msg/2 Sends a format message with severity informational.
msg/2 Sends a message with a specific severity.
msg/3 Logs a format message with a specific severity.
msg/4 Logs a format message with a specific severity from a specific process.
msg/5 Logs a format message with a specific severity from a specific process with the specified STRUCTURED-DATA (if this is supported by the formatting backend).
set_log_level/1 Change the log level to the given value.
set_log_mode/1 Change the log mode to the given mode.
warning_msg/1 Sends a message with severity warning.
warning_msg/2 Sends a format message with severity warning.

Function Details

debug_msg/1

debug_msg(Msg::io:format()) -> ok

Sends a message with severity debug. This function never fails.

debug_msg/2

debug_msg(Fmt::io:format(), Args::[term()] | no_format) -> ok

Sends a format message with severity debug. This function never fails.

error_msg/1

error_msg(Msg::io:format()) -> ok

Sends a message with severity error. Like the error_logger counterpart this function never fails.

error_msg/2

error_msg(Fmt::io:format(), Args::[term()] | no_format) -> ok

Sends a format message with severity error. Like the error_logger counterpart this function never fails.

info_msg/1

info_msg(Msg::io:format()) -> ok

Sends a message with severity informational. Like the error_logger counterpart this function never fails.

info_msg/2

info_msg(Fmt::io:format(), Args::[term()] | no_format) -> ok

Sends a format message with severity informational. Like the error_logger counterpart this function never fails.

msg/2

msg(Severity::severity(), Msg::io:format()) -> ok

Sends a message with a specific severity. This function never fails.

msg/3

msg(Severity::severity(), Fmt::io:format(), Args::[term()] | no_format) -> ok

Logs a format message with a specific severity. This function never fails.

msg/4

msg(Severity::severity(), Pid::proc_name(), Fmt::io:format(), Args::[term()] | no_format) -> ok

Logs a format message with a specific severity from a specific process. This function never fails.

msg/5

msg(Severity::severity(), Pid::proc_name(), SD::[sd_element()], Fmt::io:format(), Args::[term()] | no_format) -> ok

Logs a format message with a specific severity from a specific process with the specified STRUCTURED-DATA (if this is supported by the formatting backend). Note that STRUCTURED-DATA is not checked for validity. This function never fails.

set_log_level/1

set_log_level(Level::severity()) -> ok | {error, term()}

Change the log level to the given value.

set_log_mode/1

set_log_mode(Mode::async | sync | {sync, pos_integer()}) -> ok | {error, term()}

Change the log mode to the given mode.

warning_msg/1

warning_msg(Msg::io:format()) -> ok

Sends a message with severity warning. Like the error_logger counterpart this function never fails.

warning_msg/2

warning_msg(Fmt::io:format(), Args::[term()] | no_format) -> ok

Sends a format message with severity warning. Like the error_logger counterpart this function never fails.


Generated by EDoc