Module event_handler_csyslog

Event handler to log events to syslog using a C port driver (syslog_port).

Introduced in: 6 Dec 2004 by Fredrik Thulin <ft@it.su.se>

Behaviours: gen_event.

Authors: Fredrik Thulin (ft@it.su.se).

Description

Event handler to log events to syslog using a C port driver (syslog_port).

The reason to not do this simply by sending syslog UDP datagrams is that it would require a syslog server, or a local syslog daemon listening on a network socket. Sending to a remote syslog server would also mean that the messages wouldn't end up in the local syslog files, regardless of local syslog configuration. This is not good - we should follow the path of least surprise.

The reason for not simply writing to /dev/syslog is that Erlang refuses to open character devices.

Data Types

state()

state() = #state{}

no description

Function Index

handle_event/2 Log event using our syslog port driver.

Function Details

handle_event/2

handle_event(Event::{event, Pid, Prio, Class, Id, L}, State) -> {ok, State}

Log event using our syslog port driver.


Generated by EDoc, Oct 17 2007, 16:48:13.