title: Remove all console.log before deploying nodejs app to production?
body: <p>The question may be asked before. I am about to deploy a nodejs 10.16 app to production with <code>pm2</code> installed. Here is the <a href="https://hashnode.com/post/10-things-you-shouldnt-do-while-running-nodejs-in-production-cisab2fyu0s9oth5341faywcw" rel="nofollow noreferrer">article</a> about what NOT to do for nodejs deployment:</p>
  
  <pre><code>Not removing console.log statements
  
  While developing an app, we use console.log statements to test things out. But sometimes we forget to remove these log statements in production, which consume the CPU time and waste the resources. The best way to avoid this is to use debug module. So, unless you start your app with environment variable DEBUG nothing will be printed to the console.
  </code></pre>
  
  <p>There is no further details about what to do if I would like to receive the error output on the console screen for monitoring and debug purpose. Since there are many lines of <code>console.log</code> in my code in development. Do I have to remove them all before deploying to production? What is the standard practice about the console.log in production environment?</p>