Syslog Stream for Bunyan


000.3.26 years ago6 years agoMinified + gzip package size for @redisrupt/bunyan-syslog in KB


bunyan-syslog is a stream for bunyan that consumes raw records from bunyan and sends them to a syslog server.


npm install bunyan-syslog


var bunyan = require('bunyan');
var bsyslog = require('bunyan-syslog');

var log = bunyan.createLogger({
    name: 'foo',
    streams: [ {
        level: 'debug',
        type: 'raw',
        stream: bsyslog.createBunyanStream({
            type: 'sys',
            facility: bsyslog.local0,
            host: '',
            port: 514

log.debug({foo: 'bar'}, 'hello %s', 'world');

That's pretty much it. You create a syslog stream, and point it at a syslog server (UDP by default; you can force TCP by setting type: tcp in the constructor); default is to use facility user and a syslog server on Note you must pass type: 'raw' to bunyan in the top-level stream object or this won't work.


This module maps bunyan levels to syslog levels as follows:

| Bunyan | Syslog |
| fatal  | emerg  |
| error  | error  |
| warn   | warn   |
| info   | info   |
| *      | debug  |



If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.