raygun-winston
v1.0.2
Published
Raygun transport for Winston
Downloads
188
Maintainers
Readme
raygun-winston
Raygun transport for winston using the raygun4node library
Installation
Node 0.12+
requires npm
.
$ npm install raygun-winston --save
Usage
winston.add(require('raygun-winston'), options)
Instantiate before any other transports to ensure certain metadata properties are removed.
Options
- apiKey: String - Raygun API key, can be found in your Application General Settings
- tags: Array - Global tags to be applied to all reports
- user: Function - Generate user object using passed
req
object - version: String - For version tracking, calls
raygun.setVersion
Additionally, any option supported by raygun4node library.
Log Levels
This library only sends logs with the level error
all other levels will be ignored.
Metadata
The following winston log metadata properties are used in certain ways:
- meta.req - Server request object, used for
options.user
function- Removed after log function is invoked
- meta.err - Replaces generated
Error
object sent (better stack traces) - meta.tags - Custom tags for this specific request.