Reputation: 14889
I'm using console.log for debugging some information in my web app using node.js, expressjs and PM2. All is working fine :)
I want to know if my web app can have performance problems in production if I use console.log this:
var myVariable = "Enter in this section of code";
console.log(myVariable);
I have read about console.log is synchronous and can affect to my performance... if this is real in this moment (I'm using Express 4), how can I remove these console.log in different environments like production?
I'm using PM2 (pm2 logs command) to watch the logs and pm2 flush to clean the logs.
Thanks.
Upvotes: 1
Views: 2117