winston-honeybadger

0.5.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i winston-honeybadger

Weekly Downloads

1

Version

0.5.0

License

none

Last publish

Collaborators

  • goliatone