Ensure that syslogd has udp sockets enabled: OS X
Rsyslogd documentation can help you on Linux.
You can cheat with netcat :
sudo nc -lu 514
./rebar compile
sudo ./rebar install
A macro helps you to log
Include it:
-include_lib("syslog/src/syslog.hrl").
Start it:
application:start(syslog),
ok = syslog:settings("localhost", 514, user),
You can use default settings, and forget this line.
Use it:
?SYSLOG_INFO(wombat, "~p is happy", ["Wombat"])
$ syslog
...
Tue Mar 16 18:36:48 192.168.1.101 wombat/test[<0.39.0>]: 47: Wombat is happy
In th log, you've got : application, "/", module, "[", pid, "]: ", line, ":", message
- √ UDP
- _ TCP
- √ destination host
- √ destination port
- √ level
- √ facility