Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Erlang syslog logger
Erlang
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
test
.gitignore
Makefile
README.md
rebar

README.md

Overview

This library writes messages formatted as per RFC5424, transmitted via UDP as described in RFC5426.

Enable UDP

You can configure syslog-ng to receive these messages with the following directive:

syslog(transport("udp") port(514) keep_timestamp(yes));

Build

make

Log

0> syslog:start_link(name, app_name, "localhost", 514, local0).
ok
2> syslog:send(name, "test").
ok
3> syslog:notice(name, "other test").
ok
4> syslog:send(name, "test 3", [{timestamp, os:timestamp()}]).
ok

Logged

$ syslog
...
<134>1 2013-04-03T21:30:44.403394Z myhost.local app_name pid - - my log message
Something went wrong with that request. Please try again.