DEV Community

Discussion on: why you should not use console.log( ) for debugging ?

Collapse
 
slidenerd profile image
slidenerd

an even better option is you use pino-logger, it has methods like logger.error, logger.info etc and you can send those logs to be collected somewhere like a file or even a third party service like sentry. I dont recommend using the debug module like this when loggers exist

Collapse
 
danyson profile image
Danyson

Pino is wonderful addition to this thread.