keymetrics / pm2-logrotate

Automatically rotate all applications logs managed by PM2
1.24k stars 139 forks source link

writeStream.close in Node9.x throw error #102

Open my9074 opened 6 years ago

my9074 commented 6 years ago

https://github.com/keymetrics/pm2-logrotate/blob/master/app.js#L138

Because writestream.close has been changed in Node9, the callback function needs to be passed. Causes the log fs.truncate function to fail. In Node 8.x is OK

Unitech commented 6 years ago

Feel free to send a quick PR