pino
Version:
super fast, all natural json logger
14 lines (12 loc) • 319 B
JavaScript
const { Writable } = require('node:stream')
module.exports = (options) => {
const myTransportStream = new Writable({
autoDestroy: true,
write (chunk, enc, cb) {
// apply a transform and send to stdout
console.log(chunk.toString().toUpperCase())
cb()
}
})
return myTransportStream
}