DEV Community

Discussion on: console.log(x): The way out

yoursunny profile image
Junxiao Shi

I don't have any printf() console.log() fmt.Println() when I commit code.

Wherever logging needs to stay in production, they go through libraries:

  • C: zf_log
  • JavaScript: loglevel or debug
  • Go: logrus

Then, I can use console.log etc freely during debugging, and run git grep -nw console.log to find and delete them before committing code.