I deployed a web application in node.js by following the guide: Deploying Node.js With Upstart and Monit .
The app produces some log via console.log()
. In the upstart script, it's redirected to a log file (exec sudo -u www-data node app.js >> /var/log/app.log
).
How do I rotate this log? Do I need some particular treatment in the Javascript code? Can I send kill -USR1
to nodejs like nginx?