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

bunyan-syslog

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunyan-syslog - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

lib/tcp.js

@@ -60,3 +60,3 @@ // Copyright 2013 Mark Cavage, Inc. All rights reserved.

this.host = opts.host || '127.0.0.1';
this.port = opts.port || 10514;
this.port = opts.port || 514;

@@ -63,0 +63,0 @@ this.queue = [];

{
"name": "bunyan-syslog",
"description": "Syslog Stream for Bunyan",
"version": "0.2.1",
"author": "Mark Cavage",
"main": "./lib/index.js",
"dependencies": {
"assert-plus": "0.1.2"
},
"devDependencies": {
"bunyan": "0.18.2",
"tap": "0.3.3"
},
"scripts": {
"test": "tap test"
},
"engines": {
"node": ">=0.8"
}
"name": "bunyan-syslog",
"description": "Syslog Stream for Bunyan",
"version": "0.2.2",
"author": "Mark Cavage",
"main": "./lib/index.js",
"repository": {
"type": "git",
"url": "git://github.com/mcavage/node-bunyan-syslog.git"
},
"dependencies": {
"assert-plus": "0.1.4"
},
"devDependencies": {
"bunyan": "0.21.4",
"tap": "0.4.4"
},
"scripts": {
"test": "tap test"
},
"engines": {
"node": ">=0.8"
}
}

@@ -10,25 +10,27 @@ bunyan-syslog is a stream for [bunyan](https://github.com/trentm/node-bunyan)

var bunyan = require('bunyan');
var bsyslog = require('bunyan-syslog');
```javascript
var bunyan = require('bunyan');
var bsyslog = require('bunyan-syslog');
var log = bunyan.createLogger({
name: 'foo',
streams: [ {
level: 'debug',
type: 'raw',
stream: bsyslog.createSyslogStream({
facility: bsyslog.facility.local0,
host: '192.168.0.1',
port: 514
})
} ]
});
var log = bunyan.createLogger({
name: 'foo',
streams: [ {
level: 'debug',
type: 'raw',
stream: bsyslog.createBunyanStream({
type: 'sys',
facility: bsyslog.local0,
host: '192.168.0.1',
port: 514
})
}]
});
log.debug({foo: 'bar'}, 'hello %s', 'world');
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
`127.0.0.1:514`. Note you *must* pass `type: 'raw'` to bunyan in the stream or
this won't work.
`127.0.0.1:514`. Note you *must* pass `type: 'raw'` to bunyan in the top-level
stream object or this won't work.

@@ -35,0 +37,0 @@ ## Mappings

@@ -28,3 +28,2 @@ // Copyright 2013 Mark Cavage, Inc. All rights reserved.

t.ok(STREAM);
console.error(STREAM.toString());

@@ -31,0 +30,0 @@ LOG = bunyan.createLogger({

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