Socket
Book a DemoInstallSign in
Socket

winston-rollbar2

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-rollbar2

An updated and actively maintained Rollbar transport for Winston. Uses Rollbar v2

latest
Source
npmnpm
Version
2.1.4
Version published
Weekly downloads
36
157.14%
Maintainers
1
Weekly downloads
 
Created
Source

winston-rollbar2

Forked from https://github.com/Ideame/winston-rollbar and updated to support latest reporter and maintain longer term.

Thanks also to GorillaStack for previously keeping an updated fork: https://github.com/GorillaStack/winston-rollbar

A rollbar transport for winston.

Installation

  $ npm install winston-rollbar2

Usage

  var winston = require("winston");

  // Requiring `winston-rollbar2` will expose
  // `winston.transports.Rollbar`
  //
  require("winston-rollbar2");

  winston.add(winston.transports.Rollbar, {
    rollbarAccessToken: "API_TOKEN"
    rollbarConfig: {
      environment: "development"
    }
  });

The Rollbar transport uses rollbar.js behind the scenes. Options are the following:

  • rollbarAccessToken: Rollbar post server item access token.
  • rollbarConfig: Rollbar configuration (more info) (optional).
  • level: Level of messages this transport should log. (default: warn).
  • silent: Boolean flag to disable reporting to Rollbar. (default: false).

Requests

To use Rollbar's request logging include the key request with the value of the request object to report.

app.use("/", (req, res) => {
  winston.error("request example", {request: req});
});

Keywords

logging

FAQs

Package last updated on 15 Aug 2017

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