syslogudp

0.0.5 • Public • Published

NodeSyslogUDP

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

installation

npm install syslogudp

synopsis

var syslog = require('syslog');
var logger = syslog.createClient(514, 'localhost');

logger.info("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.

references

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    236
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    236
  • 0.0.4
    0
  • 0.0.3
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i syslogudp

Weekly Downloads

236

Version

0.0.5

License

none

Last publish

Collaborators

  • cboebel