# winston-sentry-node

> Winston 3.x transport for Sentry.io

Latest version **0.0.4** (published 2019-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install winston-sentry-node
pnpm add winston-sentry-node
yarn add winston-sentry-node
bun add winston-sentry-node
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2019-03-04 |
| First published | 2019-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | cjsheets |
| Keywords | winston, transport, winston3, raven, sentry |

## Links

- npm: https://www.npmjs.com/package/winston-sentry-node
- Repository: https://github.com/cjsheets/winston-sentry-node
- Issues: https://github.com/cjsheets/winston-sentry-node/issues
- npm.io page: https://npm.io/package/winston-sentry-node

## Dependencies (2)

- [@sentry/node](https://npm.io/package/@sentry/node.md) ^4.6.1
- [winston-transport](https://npm.io/package/winston-transport.md) ^4.3.0

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 0.0.4 (latest) — 2019-03-04
- 0.0.3 — 2019-02-18
- 0.0.2 — 2019-02-18
- 0.0.1 — 2019-02-18

## README

# winston-sentry-node

[![node](https://img.shields.io/badge/node-6.x+-brightgreen.svg)][node-url]
[![winston](https://img.shields.io/badge/winston-3.x+-brightgreen.svg)][winston-url]
[![sentry](https://img.shields.io/badge/sentry-4.x+-brightgreen.svg)][sentry-url]
![travis](https://travis-ci.org/cjsheets/winston-sentry-node.svg?branch=master)


A simple [Sentry/Node.js](https://docs.sentry.io/platforms/node/) transport for the winston 3.x logger. 

## Install

```bash
npm install --save winston-sentry-node
```

## Usage

Sample configuration:

```js
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][license-url]


[license-url]: LICENSE
[node-url]: https://nodejs.org
[sentry-url]: https://github.com/getsentry/sentry-javascript/tree/master/packages/node
[winston-url]: https://github.com/winstonjs/winston

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