I wanted a generic transform stream where i can delete some fields, like hostname & v, but when i pipe be transform stream, the transform stream does not work.
The reason for the transform stream is, that i want to use multiple streams, like fs.createWriteStream & process.stdout or what ever, and dont want to code for very stream a filter that deleted the unwanted fields.
Any help/hint is appreciated.
I cant wrap my head around why this dosnt work, and the transform stream is ignored as soon it is somewhere piped.
BTW: I switched from winston to bunyan, because its has less dependencies & got faster results "hacking" bunyan than winston.
I have a very simple setup, where i extend the bunyan logger:
I wanted a generic transform stream where i can delete some fields, like
hostname
&v
, but when i pipe be transform stream, the transform stream does not work.When i use the following stream setup:
my
console.log("transform", rec);
does log nothing, like the transform stream does nothing. When is use mymyWritable
instead, it work as expected.The reason for the transform stream is, that i want to use multiple streams, like
fs.createWriteStream
&process.stdout
or what ever, and dont want to code for very stream a filter that deleted the unwanted fields.Any help/hint is appreciated.
I cant wrap my head around why this dosnt work, and the transform stream is ignored as soon it is somewhere piped.
BTW: I switched from winston to bunyan, because its has less dependencies & got faster results "hacking" bunyan than winston.