Syslog UDP client.

npm install syslogudp
11 downloads in the last day
89 downloads in the last week
339 downloads in the last month


Syslog client for Node using UDP Heavily based on the node-syslog repo by cloudhead.


npm install syslogudp


var syslog = require('syslog');
var logger = syslog.createClient(514, 'localhost');"ping!");
logger.log("Danger Wil Robinson!",logger.LOG_WARNING, callback)

logger.close(); // explicitly close the socket

A call to callback sends two parameters - an error object and a string message.

log levels

In increasing order of severity:

  • debug
  • info
  • notice
  • warning
  • error
  • crit
  • alert
  • emerg

These are available as methods on Client, ex: logger.crit().

You may also call the log method, and pass the level as the 2nd argument:

logger.log('fnord!', syslog.LOG_CRIT);

The default level is info.


Aside from the repo noted above, this node documentation was very helpful in getting this up and running.

npm loves you