Stream data into a bole logger. Allows fine grained control over what is logged from a stream. Works exceptionally well in conjunction with http-ndjson.
$ npm install bole-stream
const boleStream = require('bole-stream')
const httpNdjson = require('http-ndjson')
const bole = require('bole')
const http = require('http')
bole.output({ level: 'info', stream: process.stdout })
http.createServer((req, res) => {
httpNdjson(req, res).pipe(boleStream({ level: 'info' }))
res.end()
}).listen()
Create a new Bole writestream. opts can contain the following values:
bole)debug, info, warn and error{ objectMode: true } shorthand.
Close the stream manually.