winston-honeybadger
v0.5.0
Published
Honeybadger transport for winston
Downloads
2
Readme
wiston-honeybadger
Honeybadger transport for Winston. It only logs error
level.
Getting Started
Install the module with:
npm install wiston-honeybadger
To register the transport:
var winston = require('winston');
require('wiston-honeybadger');
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Honeybadger)({ apiKey: 'YOUR_HONEYBADGER_API_KEY'})
]
});
winston.error('TEST ERROR!', errorMetadata, callback);
Documentation
This transport uses the honeybadger package to send data to the mother ship. This is straight from that package's documentation.
// The second argument is error tracking metadata, like user/session id
hb.send(err, {
context: {
user: 'jane',
email: '[email protected]'
},
session: {},
headers: req.headers,
params: {},
cgi_data: {
'server-software': 'Node ' + process.version
}
});
Examples
(Coming soon)
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
(Nothing yet)
License
Copyright (c) 2015 goliatone
Licensed under the MIT license.