Socket
Socket
Sign inDemoInstall

@keyrock/winston-bugsnag-transport

Package Overview
Dependencies
146
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @keyrock/winston-bugsnag-transport

Bugsnag transport for winston ^3.0.0


Version published
Maintainers
2
Install size
623 kB
Created

Readme

Source

winston-bugsnag-transport

winston transport for Bugsnag. Sends all messages with level error to Bugsnag.

Usage

First, you'll need to install the package with yarn or npm:

yarn add @keyrock/winston-bugsnag-transport

or

npm install --save @keyrock/winston-bugsnag-transport

Then, when instantiating winston:

const winston = require("winston");
const bugsnag = require("bugsnag");
const BugsnagTransport = require("@keyrock/winston-bugsnag-transport");

// You need to properly initialize your bugsnag instance. Refer to the documentation.
bugsnag.register("your api key");

// ...

const logger = winston.createLogger({
  level: "debug",
  transports: [
    new BugsnagTransport({
      bugsnag: bugsnag // Your Busgnag instance
    })
    // ... your other transports
  ]
});

Note that the initialization of the Bugnsag library should be done before initializing Winston.

License

MIT

Keywords

FAQs

Last updated on 03 Aug 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc