threerings / playn

Legacy 1.x version of PlayN library.
http://playn.io/
Apache License 2.0
194 stars 66 forks source link

Use gwt logging in playn-html #43

Closed korzha closed 10 years ago

samskivert commented 10 years ago

Is GWT's built-in logging now better than gwt-log? If not, I'd rather provide this as an alternative to HtmlLogEnhanced instead of replacing it. One already has to opt-into HtmlLogEnhanced, so they could opt-into HtmlLogGWT or something like that.

korzha commented 10 years ago

I consider gwt logging has several advantages:

I thought about providing alternative HtmlLogGWT but I would want PlayN use gwt logging too to reduce code size.

korzha commented 10 years ago

I think gwt logging and gwt-log derived from one library because they both have similar loggers but gwt logging support is stronger. For example, take a look at these CLs:

https://gwt-review.googlesource.com/#/c/8270/ https://gwt-review.googlesource.com/#/c/8224/ https://gwt-review.googlesource.com/#/c/8140/

samskivert commented 10 years ago

By default PlayN uses neither GWT logging, nor gwt-log. It uses a very simple native method that just writes to window.console.

Since GWT logging is built-in, I don't mind using GWT logging by default instead of the window.console code. Assuming the same user experience is preserved: that logging goes to the JavaScript console in the browser by default.

So if you want to redo the patch to change HtmlLogSimple to use GWT logging, and leave HtmlLogEnhanced as is, that is fine with me.

korzha commented 10 years ago

Ok

korzha commented 10 years ago

I've moved implementation into HtmlLogGwt.

samskivert commented 10 years ago

Great, I made a couple of small tweaks (and a bug fix), but otherwise it's ready to go!

korzha commented 10 years ago

Thanks!