Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cjsheets/winston-sentry-node
Sentry transport for the winston 3.x logger
https://github.com/cjsheets/winston-sentry-node
Last synced: about 1 month ago
JSON representation
Sentry transport for the winston 3.x logger
- Host: GitHub
- URL: https://github.com/cjsheets/winston-sentry-node
- Owner: cjsheets
- License: mit
- Created: 2019-02-18T16:40:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T01:29:55.000Z (almost 6 years ago)
- Last Synced: 2024-12-08T04:07:52.130Z (about 2 months ago)
- Language: TypeScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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