Main

JSLog - a Lightweight Ajax logger

Dec 18 by Andre

What JSLog looks like

When collapsed, it sits unobtrusively in the upper left-hand corner of the page like so:
When expanded, it looks like this:

Why you should use JSLog

Every language needs a System.out.println() or a Console.writeLine() -- a quick and easy way to output messages to you, the developer, during development and testing. Historically, Javascript programmers have used alert() for this purpose. The problems are:

  1. alert() forces you to acknowledge each message, which makes it very bad for debugging things like loops and mouseovers
  2. there's no graceful way to begin "productionizing" your code when it has a bunch of alerts() in it -- you have to go through and delete all the alerts or comment them out
  3. alert() notifications are incredibly intrusive, and while they are there in your code, it's impossible to ignore them
  4. once you acknowledge an alert() box, it's contents are gone and you can't refer to it again
Safe to say that if you've done AJAX programming, you are sick of alert(). JSLog solves these problems! Read on for more details.

Continue reading "JSLog - a Lightweight Ajax logger