Reputation: 2848
I wan to use the console log to resolve a bug of my application. So I view the device console log using Xcode. Problem is console log has clear the earlier logs and it shows only limited amount of log entries. Is there a way to access old log entries.
Upvotes: 8
Views: 4478
Reputation: 3582
I found two ways to do this.
On the device, press both volume buttons and the lock button simultaneously. Release after 1 second. You should feel the device vibrate. Note that holding down the buttons for longer than that will bring up the emergency call screen.
On the device, go to Settings -> Privacy -> Analytics -> Analytics Data.
Scroll down until you see sysdiagnose_<current date>. Select it, and tap the send button. Tap on your computer name to send the log via AirDrop.
On your computer, accept the AirDropped item. This will be a tar.gz file
Open the tar.gz file and decompress. Inside, you will see system_logs.logarchive
Double-click system_logs.logarchive. This should open the bundle in Console.
log
tool. From Terminal, run log collect --device --output logs.logarchive
. Then, open logs.logarchive in Console.Note that Console will only show the last 5 minutes of messages by default. You can change this near the bottom of the window:
Upvotes: 12