winston-sentry-node
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

winston-sentry-node

node winston sentry travis

A simple Sentry/Node.js transport for the winston 3.x logger.

Install

npm install --save winston-sentry-node

Usage

Sample configuration:

const winston = require('winston'),
const SentryTransport = require('winston-sentry-node');
 
var logger = new winston.Logger({
  transports: [
    new winston.transports.Console({level: 'verbose'}),
    new SentryTransport({
      sentry: {
        dsn: "{{ YOUR SENTRY DSN }}"
      }
    })
  ],
});

You can also add the DSN to the SENTRY_DSN environment variable.

Sentry.init({dsn: ...}) is called automatically when you create the transport.

License

MIT License

Package Sidebar

Install

npm i winston-sentry-node

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

10.9 kB

Total Files

7

Last publish

Collaborators

  • cjsheets