# winston-rollbar2

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

Latest version **2.1.4** (published 2017-08-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install winston-rollbar2
pnpm add winston-rollbar2
yarn add winston-rollbar2
bun add winston-rollbar2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.4 |
| Published | 2017-08-15 |
| First published | 2017-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Thomas Luff |
| Maintainers | hipyhop |
| Keywords | logging, sysadmin, tools, winston, rollbar |

## Links

- npm: https://www.npmjs.com/package/winston-rollbar2
- Repository: https://github.com/hipyhop/winston-rollbar
- Issues: https://github.com/hipyhop/winston-rollbar/issues
- npm.io page: https://npm.io/package/winston-rollbar2

## Dependencies (2)

- [rollbar](https://npm.io/package/rollbar.md) ^2.1.3
- [winston](https://npm.io/package/winston.md) ^2.3.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.1.4 (latest) — 2017-08-15
- 2.1.3 — 2017-08-15
- 2.0.4 — 2017-08-11
- 2.0.3 — 2017-08-11

## README

# 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][1] transport for [winston][0].

## Installation

``` sh
  $ npm install winston-rollbar2
```

## Usage
``` js
  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][2] behind the scenes.  Options are the following:

* **rollbarAccessToken**: Rollbar post server item access token.
* **rollbarConfig**:      Rollbar configuration ([more info][3]) (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.

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

[0]: https://github.com/flatiron/winston
[1]: https://rollbar.com
[2]: https://github.com/rollbar/rollbar.js
[3]: https://rollbar.com/docs/notifier/rollbar.js/#configuration-reference

---
_Source: https://npm.io/package/winston-rollbar2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
