bunyan-syslog
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -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({ |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
59
4
42832
486
+ Addedassert-plus@0.1.4(transitive)
- Removedassert-plus@0.1.2(transitive)
Updatedassert-plus@0.1.4