This is a quick and dirty way to cleanup logging in nodejs, this is particularly useful when running pm2 and the programmer is using console.log to debug their code and hasn’t cleaned it up, if pm2 is logging by default your disk could fill up.
Add the below line to your code to send console.log nowhere
//Disable all logging
console.log = function() {}
With regards to pm2, by default the logs are in ~/.pm2/logs
#nodejs #pm2