Module syslog_socket

Erlang syslog Client Interface

A minimal syslog client interface that supports both RFC3164 and RFC5424.

Copyright © 2016-2017 Michael Truog

Version: 1.7.2 Sep 12 2017 16:28:35 ------------------------------------------------------------------------

Behaviours: gen_server.

Authors: Michael Truog (mjtruog [at] gmail (dot) com).

Description

Erlang syslog Client Interface

A minimal syslog client interface that supports both RFC3164 and RFC5424.

Data Types

app_name()

app_name() = nonempty_string()

facility()

facility() = kernel | user | mail | daemon | auth0 | syslog | print | news | uucp | clock0 | auth1 | ftp | ntp | auth2 | auth3 | clock1 | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7 | non_neg_integer() | auth | authpriv | cron | kern | lpr | security

message_id()

message_id() = string() | binary()

options()

options() = [{transport, transport()} | {transport_options, list()} | {protocol, protocol()} | {utf8, boolean()} | {facility, facility()} | {app_name, app_name()} | {path, nonempty_string()} | {host, inet:ip_address() | inet:hostname()} | {port, undefined | inet:port_number()} | {timeout, timeout_milliseconds()}]

protocol()

protocol() = rfc3164 | rfc5424

severity()

severity() = emergency | alert | critical | error | warning | notice | informational | debug | 0..7 | emerg | panic | crit | err | warn | info

timeout_milliseconds()

timeout_milliseconds() = 1..4294967295

transport()

transport() = local | udp | tcp | tls

Function Index

code_change/3
facility/1

Get the syslog facility numerical value.

.
facility_valid/1

Test the validity of a syslog facility value.

.
handle_call/3
handle_cast/2
handle_info/2
init/1
send/3

Send data to syslog without a timestamp or message_id.

.
send/4

Send data to syslog without a message_id.

.
send/5

Send data to syslog.

.
severity/1

Get the syslog severity numerical value.

.
severity_valid/1

Test the validity of a syslog severity value.

.
start_link/1

Start a syslog socket.

Connection is immediate within the new Erlang process.
stop_link/1

Stop an existing syslog socket asynchronously.

.
stop_link/2

Stop an existing syslog socket synchronously.

.
terminate/2

Function Details

code_change/3

code_change(X1, State, X3) -> any()

facility/1

facility(Facility::facility()) -> non_neg_integer()

Get the syslog facility numerical value.

facility_valid/1

facility_valid(Facility::facility()) -> boolean()

Test the validity of a syslog facility value.

handle_call/3

handle_call(Request, X2, State) -> any()

handle_cast/2

handle_cast(Request, State) -> any()

handle_info/2

handle_info(Request, State) -> any()

init/1

init(X1) -> any()

send/3

send(Pid::pid(), Severity::severity(), Data::iodata()) -> ok

Send data to syslog without a timestamp or message_id.

send/4

send(Pid::pid(), Severity::severity(), Timestamp::undefined | erlang:timestamp(), Data::iodata()) -> ok

Send data to syslog without a message_id.

send/5

send(Pid::pid(), Severity::severity(), Timestamp::undefined | erlang:timestamp(), MessageId::message_id(), Data::iodata()) -> ok

Send data to syslog.

severity/1

severity(Severity::severity()) -> 0..7

Get the syslog severity numerical value.

severity_valid/1

severity_valid(Severity::severity()) -> boolean()

Test the validity of a syslog severity value.

start_link/1

start_link(Options::options()) -> {ok, pid()} | {error, any()}

Start a syslog socket.

Connection is immediate within the new Erlang process.

stop_link/1

stop_link(Pid::pid()) -> ok

Stop an existing syslog socket asynchronously.

stop_link/2

stop_link(Pid::pid(), Timeout::timeout_milliseconds()) -> ok

Stop an existing syslog socket synchronously.

terminate/2

terminate(X1, State) -> any()


Generated by EDoc, Sep 12 2017, 16:28:36.