Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goliatone/winston-honeybadger
Honeybadger transport for Winston
https://github.com/goliatone/winston-honeybadger
Last synced: 4 days ago
JSON representation
Honeybadger transport for Winston
- Host: GitHub
- URL: https://github.com/goliatone/winston-honeybadger
- Owner: goliatone
- License: mit
- Created: 2015-06-29T17:40:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T21:50:24.000Z (over 8 years ago)
- Last Synced: 2024-10-11T09:08:28.596Z (27 days ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# winston-honeybadger
[Honeybadger][hon] transport for [Winston][wjs]. It only logs `error` level.
## Getting Started
Install the module with:
```
npm install winston-honeybadger
```To register the transport:
```javascript
var winston = require('winston');
require('wisnton-honeybadger');var logger = new (winston.Logger)({
transports: [
new (winston.transports.Honeybadger)({ apiKey: 'YOUR_HONEYBADGER_API_KEY'})
]
});
``````js
winston.error('TEST ERROR!', errorMetadata, callback);
```## Documentation
This transport uses the [honeybadger][npm-hon] package to send data to the mother ship. This is straight from that package's documentation.
```javascript
// 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](http://gruntjs.com/).## Release History
_(Nothing yet)_## License
Copyright (c) 2015 goliatone
Licensed under the MIT license.[hon]: http://honeybadger.io
[npm-hon]: https://www.npmjs.com/package/honeybadger
[wjs]: http://github.com/winstonjs/winston