re: What JS Logging library / tool do you use? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Please, please try ulog It is just over 1KB and it supports all this stuff out of the box. Plus it has a test suite and everything and does not hav...

This code has a weird smell. Can you give me an example of an expensive function call where the only thing you would want to do is log the output in a development environment.

It is an example. The point is that if you do expensive things to produce the arguments of a log call, the fact that the log function is a no-op does not help with performance. In such cases you need the if. The example is there to demonstrate the if.

code of conduct - report abuse