There is a goog.log package.[1]

Unless I’m mistaken, those calls are removed by the compiler.

It might be nice to have a generic cross-platform logging package.

[1]https://google.github.io/closure-library/api/goog.log.html 
<https://google.github.io/closure-library/api/goog.log.html>
> On Jul 12, 2017, at 10:06 AM, Justin Mclean <jus...@classsoftware.com> wrote:
> 
> Hi,
> 
>> Once we’re on this topic, there’s something that I had wanted to bring up 
>> for a long time: I think trace statements should disappear in the release JS 
>> build. Should we put all the JS trace code inside an if(goog.DEBUG)  block?
> 
> I’d suggest putting in a static Log class/method that is does nothing if 
> goog.DEBUG is false and traces goog.DEBUG is true. That way it makes easier 
> to move to a real logging system at some point in the future.
> 
> Thanks,
> Justin

Reply via email to