Node.js Bunyan library for logging to LogDNA
$ npm install --save logdna-bunyan
Please see the logdna npm module for the API.
This module also provides a transport object, which can be added to bunyan using:
let LogDNAStream = require('logdna-bunyan').BunyanStream;
let logDNA = new LogDNAStream({
key: apikey
});
var logger = bunyan.createLogger({
name: "My Application",
streams: [
{ stream: process.stdout },
{ stream: logDNA,
type: 'raw'
}
]
});
logger.info('Starting application on port %d', app.get('port'));
NOTE: You must use the raw
stream type
MIT © LogDNA
Happy Logging!