try { //some code goes here } catch (Exception e) { logToTwitter(“Application Name”, e.getStackTrace()); }

It started with one Tweet from me, followed up by and Retweet from Kelly Sutton to actually give it serious thought. Instead of having to view logs, why not have an exception stack trace appear in your Twitter time line? With services like Twitlonger, one can easily shove an entire stack trace into a Tweet. Privacy can be dealt with on Twitter’s side by setting the privacy of the Twitter Bot user. Except if you’re using Twitlonger.

try
{
   //some code goes here
}
catch (Exception e)
{
   logToTwitter("Application name", new Date(), e);
}

Instead of the entire stack trace, you can just get a one-liner of the type of exception it is along with a date/time stamp for references when digging through logs.

I guess the one limiting factor of this is the assumption that whatever app is using this logging method have an internet connection.

In any case, this has given me something to think about. I’d love to see this usefulness in actual applications. With Twitter Lists now enabled, developers can have a whole bunch of logging accounts in a separate list if they don’t want their time line polluted with exceptions. But if they are worried about that, don’t write code that will throw exceptions. :)