DEV Community

Discussion on: Say Goodbye to console.log from Production environment

 
visualjeff profile image
Jeff • Edited

Calling info() will cause an exception.

So a better approach would be to do the following if you are only interested in silencing console.log:

globalThis.console.log = () => {};
Enter fullscreen mode Exit fullscreen mode

It's helpful you called this out.