As a developer for SixApart Services, one thing I do a lot of is put debug code in plugins I’m working on to output values to Movable Type’s backend activity log. This can get messy, and I usually end up writing a one-off debuglog function for each plugin to make this more convenient.

Well, I finally got tired of the run-around and wrote a rpoof-of-concept plugin that uses monkeypatching to add a debuglog function to MT’s built-in Plugin.pm.

http://github.com/sivy/movable-type-plugin-debug/tree/master

It works by looking for a config directive in mt-config.cgi:

PluginDebug mypluginid, myotherpluginid

If the id of the currentplugin is in that list, then calling:

$plugin->debuglog($msg);

…will add the message to the activity log with a log level of debug. For the lazy, you can also use ‘all’ as the value of PluginDebug:

PluginDebug all

And any call to $plugin->debug will get logged. My hope is to see this get added to MT core soon (hence the “proof of concept” status) but I welcome any thoughts on how to make this better for developers.

Waking Up

Kids are in the other room, watching Bolt. Jodi’s headed out to run errands, and if you’ve been following my tweets (seemingly the only place I post these days) you’ll know that I’m laid up with a bad back. Which, frankly, sucks.

I’m generally a healthy person - I’m no paragon of fitness or anything, but I do ok for the late-thirties nerd set. So waking up Monday morning with a stabbing pain between the shoulder blades was an unpleasant surprise. Two visits to the chiropracter on Monday provided temporary relief, but I awoke Tuesday morning in even more pain, and Tuesday is the chiro’s day off. So, I took some sage advice and instead of spending the day in front of the computer, jacking up my upper back even more, I spent the day in bed.

This would have been great, had I not also decided that I’d take some Tylenol plus codeine leftover from a previous bout of dental surgery. Bad idea. Not only did it make me completely loopy, I had a bad reaction and it left me throwing up all day.

Sigh. Today finds me better, but still hurting, trying to find the combination of heat, cold, rest, work, and double-strength Motrin that will let me continue to be a productive member of society.

The New Scarcity

Interesting thought: while many net-nerds talk about the new non-scarcity of resources in the internet age, they’re quite happy to use artificial scarcity to promote their new social network, in the form of invite-only services. Discuss.

First post from iPhone!

I completely forgot that I had installed the iPhone interface plugin on my site until just now. Awesome.

Every once in a while someone links to some bit of my “stuff” that I had completely forgotten about, and it’s kinda fun. On Monday, Aaron at Flickr posted to their Code.Flickr blog about machine tags, and linked to a...
Continue Reading →

Microformats Wiki redesign

Ben Ward did a fantastic job redesigning the microformats wiki....
Continue Reading →

Yes We Can

Regardless of your opinion or affiliation, this is an amazing, inspiring moment in American history....
Continue Reading →

Hey Steve, make with the posting!

Ok, so posting has been, as they say in the industry, “light” lately. Meanwhile, work has been “crazy”, and by “crazy” I mean “crazy good”. :-) At my last position, I rarely got to work on anything that I could...
Continue Reading →

Leaving New York

The view from my cab, driving away from Manhattan after my visit to Six Apart NYC a couple weeks ago....
Continue Reading →

Redmonk, circa 2001

Thanks to Google’s “Search 2001” special feature, I can point out that at one time, this site was the top “redmonk” (link will be live for only one month) and redmonk.com was selling christmas products. (Sorry James! :-P)...
Continue Reading →

R.E.M. Says:

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID