JSPM

winston-sentry-node

0.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q34467F
  • License MIT

Winston 3.x transport for Sentry.io

Package Exports

  • winston-sentry-node

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (winston-sentry-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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