@audibene/bunyan-logrocket-stream
v0.0.4
Published
This library will send logs to your LogRocket account. It assumes that your application has a LogRocket instance already set up.
Downloads
11
Keywords
Readme
bunyan-logrocket-stream
This library will send logs to your LogRocket account. It assumes that your application has a LogRocket instance already set up.
The usage of the library is pretty straight foward, you just need to install the module:
npm i bunyan-logrocket-stream --save
or yarn add bunyan-logrocket-stream
and then use it by passing the logRocket instance as parameter for the stream constructor:
{
level: 'trace',
type: 'raw',
stream: new LogRocketStream(LogRocket)
}
Example:
import bunyan from 'bunyan'
import LogRocket from 'logrocket'
import LogRocketStream from '@audibene/bunyan-logrocket-stream';
LogRocket.init('amazing-stuff', {
...
})
const logger = bunyan.createLogger({
...
streams: [{
level: 'trace',
type: 'raw',
stream: new LogRocketStream(LogRocket)
}]
});
Suggestions are welcome and become a contributor, take a look at the CONTRIBUTING section