A Writable Stream that supports linux logrotate style options
var LogStream = require('logrotate-stream')
, toLogFile = LogStream({ file: './test.log', keep: 3 });
someLogStream.pipe(toLogFile);
The file to write data to
The number of log files to keep
Optionally compress rotated files
With npm do:
npm install logrotate-stream