Lumberjack (The Javascript Logger) Demo

First press ALT-D (Or CTRL-D on OS X) to toggle the log console... Then play around

Do you write javascript? Are you sick of using alerts to find out what is happening in your code? Then Lumberjack is for you! It helps beat down the nightmare that is cross-browser javascript debugging.

Here is how it works, Push the Buttons to send messages to the logger.

You can filter output using regular expressions and the . Every message sent to the logger is tagged with a value (More about custom tags below). For example, and it will only show errors, and it will only show warnings and info, and it will show all messages.

So How Does This Work In Code?

It's simple...

  1. Include the script file <script src="/javascripts/logger.js" type="text/javascript"></script>

  2. Call Logger.error("error") or Logger.info("info") or any of the other default tags (Error, Warning, Debug, Info).

  3. Custom messages can be sent by calling Logger.log("Custom Message", "CustomTag")

  4. For ruby lovers I added a the shortcut puts("Something", "OptionalTag")

      Thats it... just toggle the console window ALT-D (Or CTRL-D on OS X) and you can see results on screen.

It's a Console too!

A javascript console is great because you can inspect values or test code snippets very quickly.

Any valid javascript can be entered into the console. (, , )

You can inspect any javascript object by using the inspect function... just type something like inspect(document.body) or inspect("element_id") at the command line.
Press Up or Down in the command line to cycle through old commands.
Type clear at the command line to clear the log

Comment On Lumberjack Here

Download Lumberjack (The Javascript Logger)

Lumberjack requires that you include the prototype javascript file!

email me at probablycorey.spam@gmail.com if you have comments.