Uses cluster
to run workers for each CPU core.
npm install
Edit config.json
.
This script generates and writes random lines into inputLogFile
node fill.js
This script watches inputLogFile
with node-tail
and writes lines that it gets into into outputLogFile
node tail.js
It will fail from time to time receiving corrupted lines (depending on the intensivity of write).
Corrupted lines will go to output.log
, input.log
will contain correct lines.