iOS Syslog Stuff!

The iPhone and iOS in general have never been really well known for their ability to get too much under the hood, unless you are jailbreaking. That does not necessarily mean that there are not, albeit limited, options.

Tonight I was poking around to see if I could get at the system log on my iPhone. This article at the iPhone Wiki gives many options, but after doing a bit more looking, I found a bit more of a direct method in the macports tree (this is of course, OS X only).

The MobileDevice tool is available off macports and can be installed as simple as running

sudo port install MobileDevice

After this is done, you have access to the MobileDevice API off the command line with theĀ mdf tool.

The current syslog can be gathered by running

mdf -d 0 syslog

This will gather the current syslog buffer and also start tailing the device. You will need to make sure that the device is authorized on the computer first. mdf list will list your connected devices (-d 0 is the device specification).

There are a few other neat things that you can do with the mdf script and the MobileDevice modules themselves, check out the markdown for more info.