New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

winston3-transport-sentry

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston3-transport-sentry

winston`s transport for Sentry (raven)

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

winston3-transport-sentry

This package is a fork of @alexpts's alexpts/winston-transport-sentry

Compitable

Winston@3+

Install

npm i --save winston@3 winston3-transport-sentry

Sentry transport for winston@3 logger for node js

Follow this sample configuration to use:

const winston = require('winston'),
const Mail = require('winston-mail').Mail,
const Sentry = require('winston3-transport-sentry');

var logger = new winston.Logger({
    transports: [
        new winston.transports.Console({level: 'silly'}),
        new Sentry({
            level: 'warn',
            dsn: "{{ YOUR SENTRY DSN }}",
            tags: { key: 'value' },
            extra: { key: 'value' },
            user: {},
            patchGlobal: false
        })
    ],
});

If you want to use patchGlobal to catch all uncaught errors, simply pass it as option like this:

new Sentry({
    patchGlobal: true
});

Winston logging levels are mapped to the default sentry levels like this:

{
    silly: 'debug',
    verbose: 'debug',
    info: 'info',
    debug: 'debug',
    warn: 'warning',
    error: 'error'
}

Keywords

FAQs

Package last updated on 17 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc