Skip to content

Commit

Permalink
add auto batching entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ovhemert committed Jul 20, 2021
1 parent 09dd369 commit fb4f533
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stackdriver.js
Expand Up @@ -42,6 +42,8 @@ function _getKey (log, data, k, keys) {
return undefined
}

function _noop () {}

module.exports.parseJsonStream = function () {
return split2(_jsonParser)
}
Expand Down Expand Up @@ -108,7 +110,8 @@ module.exports.toStackdriverStream = function (options = {}) {
objectMode: true,
write (chunk, encoding, callback) {
const entry = log.entry(chunk.meta, chunk.data)
log[chunk.meta.severity](entry, callback)
log[chunk.meta.severity](entry, _noop)
callback()
}
})
return writableStream
Expand Down

0 comments on commit fb4f533

Please sign in to comment.