Live logs
iOS devices produce a large volume of log output. Live logs shows that output in real time and provides filters to find what you need.
- Select the device.
- Open Live logs.
- Optionally, choose an app. Then use the app on the device.
Log lines appear as they are written. You do not need to enable anything on the device or add anything to your build.
Filters
Section titled “Filters”Three filters are available. Combining them usually works best.
- App. Shows only one app’s process. Start here.
- Keyword. Matches text anywhere in the line. Your app’s own log prefix is the most useful keyword.
- Process. Broader than the app filter. Use it to follow a system process that reports problems related to your app.
System messages worth reading
Section titled “System messages worth reading”The system logs heavily, and most of it can be ignored. Some messages are worth attention:
| Message | Worth reading? |
|---|---|
| Memory pressure warnings | Yes. Often the last message before a jetsam termination. |
| Watchdog / hang reports | Yes. The main thread was blocked long enough to be detected. |
| Network reachability changes | Yes, when investigating intermittent request failures. |
| Layout constraint conflicts | Yes. These usually come from your own code. |
| Routine daemon messages | No |
Save logs
Section titled “Save logs”Save writes the current view to a text file. The saved file contains only the filtered lines, not the full stream. This is usually what you want to attach to a ticket. State which filter you used in the ticket.
For a reproducible issue:
- Clear the log.
- Reproduce the issue.
- Stop.
- Save.
A log that starts ten minutes before the event is much harder for others to read.
When the log ends without explanation
Section titled “When the log ends without explanation”Live logs only show what the app chose to log. If the app froze or disappeared, the log stops without explaining why. Next steps:
- If the log ends suddenly without an exception, the process was probably terminated. Check memory in a performance capture. A jetsam termination after rising memory looks exactly like this.
- A crash always writes a report, even if the app logged nothing. See Crash logs.
