An open API service indexing awesome lists of open source software.

https://github.com/bcherny/winston-bugsnag

A Bugsnag transport for Winston
https://github.com/bcherny/winston-bugsnag

bugsnag javascript nodejs winston

Last synced: 2 months ago
JSON representation

A Bugsnag transport for Winston

Awesome Lists containing this project

README

        

# Winston-Bugsnag

[Bugsnag](https://bugsnag.com) transport for [Winston](https://github.com/winstonjs/winston)

# Installation

```sh
npm install winston-bugsnag --save
```

# Usage

```js
import * as bugsnag from 'bugsnag'
import { add } from 'winston'
import { BugsnagTransport } from 'winston-bugsnag'

bugsnag.register('Bugsnag api key goes here')
add(BugsnagTransport)
```

# Passing `userId` to Bugsnag

```js
import * as bugsnag from 'bugsnag'
import { add, log } from 'winston'
import { BugsnagTransport } from './'

bugsnag.register('api key goes here')
add(BugsnagTransport)

log('info', 'something', {
userId: 'abcdef'
})
```

# License

MIT