Flash Logging through FireBug!

FireBug Sample OutputThis – Thunderbolt – is seriously an invaluable resource for all Flash Engineers.  Well, that’s if you use FireBug with FireFox, and c’mon, who doesn’t nowadays? So basically, all you have to do is import the “Logger” class and log messages, then those messages appear in the Console tab in FireBug.  Thunderbolt is great because as Flash Engineers, we’re constantly having to prove exceptions and make cases to QA.

Other than just logging, which it does on so many different levels – it provides memory snapshots, application stats and so much more. It works with Flash CS(X), Flex(X), Air(X) and even comes with an external output panel/console.

Check this switch out… enough said.
Get it here, http://code.google.com/p/flash-thunderbolt/downloads/list.

switch (label)
 {
 case "info":
 Logger.about();
 Logger.info("FLash is calling: A simple string", myString);
 break;
 case "warn":
 Logger.warn ("FLash is calling: Two log objects: A number typed as int and a string", myNumber, myString);
 break;
 case "error":
 Logger.error ("FLash is calling: An array with a nested object: ", myArray);
 break;
 case "debug":
 Logger.debug ("FLash is calling: An object with a nested object and nested array", myObject);
 break;
 case "memory":
 Logger.info("FLash is calling: " + Logger.memorySnapshot());
 break;
 default:
 Logger.error ("FLash is calling: No button found with a label called " + label);
 }
 };

Thanks to Jens Krause

This entry was posted in Flash AS3, Logging and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *