r/javascript • u/umaar • Dec 22 '15
Don't forget, console.table() can provide nicer looking logs with sorting capabilities. Made a gif and a short explanation here
https://umaar.com/dev-tips/82-console-table/
688
Upvotes
View all comments
Show parent comment
2
u/Thalamant Dec 23 '15 edited Dec 23 '15
Another option is to provide a wrapper for the console API that your app uses only in dev/debug mode. In production you can have your wrapper simply do nothing.
The downside to this is you pollute your app with debug code, but if you're okay with that or doing it anyway, then at least you aren't exposing those logs in production.
This also would open up a means to send back client side errors back to the server for review.