0.5.0 • Published 9 years ago
winston-honeybadger v0.5.0
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: 'a@b.net'
},
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.