winston-sentry-javascript-node
Sentry transport for the winson logger 3+ and uses the @sentry/node SDK instead of the old Raven.
This package is written in Typescript with the well typing and code quality.
Installation
npm install winston-sentry-javascript-node --save
Usage
; const logger = winston; logger;logger;
Extra / Tags / User Example
Set user information, as well as tags and further extras.
logger;
Handle Exception
Catch and send uncaughtException
to the Sentry.
const logger = winston; // or const logger = winston;
Options
opts
- opts: TransportStreamOptions
interface TransportStreamOptions format?: logformFormat; level?: string; silent?: boolean; handleExceptions?: boolean; log?info: any void: any; logv?info: any void: any; close?: void;
- opts.sentry: Please see Sentry client options.
Default Extra for Error Object
By default, if you provide an Error Object to logger, this package will set the following extra:
stack: errstack message: errmessage
© Ben Hu (benjamin658), 2019-NOW
Released under the MIT License