Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@farmersdog/bunyan-syslog

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@farmersdog/bunyan-syslog

Syslog Stream for Bunyan

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Installation

npm install -S @farmersdog/bunyan-syslog

About

This fork is compliant with RFC 5424. It supports Structured Data component in messages as well as TLS over TCP.

Local syslog bindings have been removed.

Usage

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

var log = bunyan.createLogger({
  name: 'foo',
  streams: [{
    level: 'debug',
    type: 'raw',
    stream: bsyslog.createBunyanStream({
      type: 'tcp',
      tls: true,
      data: '[structured data]'
      facility: bsyslog.local0,
      host: '192.168.0.1',
      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 use TCP by setting type: tcp in the constructor).

Note you must pass type: 'raw' to bunyan in the top-level stream object or this won't work.

Mappings

This module maps bunyan levels to syslog levels as follows:

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

License

MIT.

FAQs

Package last updated on 31 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc