Monitoring System Logs
Many apps log informative (and potentially sensitive) messages to the console log. The log also contains crash reports and other useful information. You can collect console logs through the Xcode Devices window as follows:
- Launch Xcode.
- Connect your device to your host computer.
- Choose Window -> Devices and Simulators.
- Click on your connected iOS device in the left section of the Devices window.
- Reproduce the problem.
- Click on the Open Console button located in the upper right-hand area of the Devices window to view the console logs on a separate window.
To save the console output to a text file, go to the top right side of the Console window and click on the Save button.
You can also connect to the device shell as explained in Accessing the Device Shell, install socat via apt-get and run the following command:
iPhone:~ root# socat - UNIX-CONNECT:/var/run/lockdown/syslog.sock ======================== ASL is here to serve you > watch OK Jun 7 13:42:14 iPhone chmod <Notice>: MS:Notice: Injecting: (null) [chmod] (1556.00) Jun 7 13:42:14 iPhone readlink <Notice>: MS:Notice: Injecting: (null) [readlink] (1556.00) Jun 7 13:42:14 iPhone rm <Notice>: MS:Notice: Injecting: (null) [rm] (1556.00) Jun 7 13:42:14 iPhone touch <Notice>: MS:Notice: Injecting: (null) [touch] (1556.00) ...