How to enable Syslog on iPhone fw 2.x for debugging

news 7 Comments »

You can no longer debug output in 2.0 by launching your app from SSH. So how do you get those NSLog outputs? The answer is to enable the syslog and then you can use tail -f /var/log/syslog to see all the output. Here is how:

  1. edit /System/Library/LaunchDaemons/com.apple.syslogd.plist
  2. find the <string>/usr/…/syslogd</string> line
  3. below that add:
    <string>-bsd_out</string>
    <string>1</string>
  4. Type: echo '*.* /var/log/syslog' > /etc/syslog.conf (open /etc/syslog.conf and make sure that you have *.* /var/log/syslog without any extra characters)
  5. Type: launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
  6. Type: launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist

And now you have an awesome /var/log/syslog that contains NSLogs (and I think stderr) from your application.

Remember, to see the output open SSH and type: tail -f /var/log/syslog to see all the output.

Source of these info: TheBigBoss website, and originally from Saurik.

Here’s an output example… frack!

Mar 23 09:56:37 iPhosk com.apple.locationd[198]: 259491397.100,static void CLFileUpdate::onDownloaded(CLFileDownload*, bool, void*): could not download from https://iphone-services.apple.com/clbl/unauthorizedApps to /var/root/Library/Caches/locationd/clients-b.plist.temp

Microcontrollore 8051

e-books No Comments »

XML e XQuery in SQL Server 2005

e-books No Comments »

2006 coop w/ Davide & Silvia

HCHLIB: HTTP Adaptation Layer

e-books No Comments »

Http_channel_lib is a UNIX library to establish a client/server communication trought HTTP/1.0 and MIME. It can encode data (base64, quoted printable) and it’s compliant with RFCs 821, 1945, 2045. Included full documentation in Italian.

Check the homepage of the project on http://sourceforge.net/projects/hchlib/ for further details.

Laboratorio VHDL

e-books No Comments »

Indice analitico in C

e-books No Comments »

© 2000-2007 by fosk & powered by Wordpress themed by N.Design Studio