Thursday, June 30, 2011

Logcat

I've always wondered why some will say they keep a diary, while others will say they journal. In many cases, I bet that if we were to lay our eyes on these private collections, we'd find them to be the same despite the difference in name. Perhaps some prefer the term "journal" because it has a more objective ring to it, like the grown-up version of a diary, even if they're really the same thing. Or at least that's why I try to convince people that I "journal."

Now if I wanted to sound really sophistiqué, perhaps I'd say that I'm actually logging, which has the ring of "science log" or "captain's log." And it turns out that with my Android device, I actually am logging all the time, at least in the form of a constant stream of debugging logs from my phone. And in some rare instances, I might actually want to read those logs.

While attempting to track down some very nasty and elusive bugs prior to releasing an update to tXtFL Mobile, I was using CatLog, a nifty log reader that lets me view debugging and--alas!--crash reports from these logs right on the device. But for some reason, try as I might, I couldn't see RuntimeExceptions in the stacktraces from my crashes. Rubbing my eyes, I wondered if I was missing something--I mean, logs shouldn't lie, right? Yet the traces of my crash disappeared without a trace.

This couldn't be right, so I decided to hunt for an alternative log viewer. While scouring the Android Market, I landed on an app called Logcat Live Wallpaper, with an alluring description, "A must-have for geeks =)". And it lived up to the hype.

A lonely picture cannot quite capture the aura of such artistry.

The beauty of the app is at least in part from the animations. It apparently takes inspiration from retro computers with "features" such as interference banding that routinely traverses the screen as in old monochrome monitors. It even has random speckling and and an "old phosphor" effect to mimic poor latency. What I liked most about it, though, is the fact that it's a live wallpaper, meaning that as soon as your program crashes, you find yourself staring at the stack trace, laced with the nostalgia of the 80s just to soften the blow.

As much as I enjoyed the wallpaper, I still needed a more dedicated way to view logs for actual debugging purposes. Fortunately, the CatLog developer was responsive and figured out how to restore the full output from logcat so that I could dissect out the RuntimeException stacktrace from the logs.

Notice the exception appearing in full force.

So after dissecting out the bugs that caused those RuntimeExceptions from my code as well, I was finally able to upload tXtFL Mobile 0.99.8. Of course, there will be more bugs (and features!) to come, so I won't stop "logging" quite yet.

Trying to sack some bugs. The new X's & O's animation from tXtFL now depicts QB sacks.