Gears Future APIs: Messaging API Move over Jobs, we Geared you up! :)
Dec 28

Gears Future APIs: Logging API

Gears, Google, Tech Add comments

Logging is famously over engineered in Java, with huge abstractions. In JavaScript, the majority of folk still use alert() or write out to the Error Console. Of course, those that know, use Firebug and such.

It would be nice to be able to debug throughout the browsers, and inside of WorkerPools in the Gears world. Rather than reinvent the wheel, our Logging module should be as close to the Firebug API as possible:

class GearsLogger {
  // All these methods interpolate _args_ into _message_, replacing occurrences of _%s_.
  debug(String message, Object[] args);
  info(String message, Object[] args);
  warn(String message, Object[] args);
  error(String message, Object[] args);
}

As we see more of these get out there, I hope that we come together and define some simple logging that developers can be assured of. Having to always use Firebug Lite, or define window.console if the object isn’t there, is a pain.

Other Future APIs

Disclaimer: This is early days, and who knows what the final API will look like, or if it will even make it. Do you have ideas for cool Gears that make the Web better? Let us know!.

3 Responses to “Gears Future APIs: Logging API”

  1. Zach Leatherman Says:

    It would be nice if the JavaScript minimizers accepted a whitelist of function names that it would prune out when it performs the minimization. That way, we could put debugging info all over the place without having to worry about file size bloat.

  2. Ajaxpert Says:

    Very good tutorial for Logigging.

    Here is good tutorial for AJAX and CSS Tutorial

  3. wholesale replica handbags Says:

    .thanks for your sharing.

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'ajax'