Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get old console log

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.

like image 575
nath Avatar asked Sep 12 '13 06:09

nath


People also ask

Where are console logs stored?

Steps to Open the Console Log in Google Chrome By default, the Inspect will open the "Elements" tab in the Developer Tools. Click on the "Console" tab which is to the right of "Elements". Now you can see the Console and any output that has been written to the Console log.

How do I view console history in chrome?

Console Logs in Chrome: In Google Chrome, the Console Logs are available as a part of Chrome Dev Tools. To open the dedicated Console panel, either: Press Ctrl + Shift + J (Windows / Linux) or Cmd + Opt + J (Mac).


1 Answers

I found two ways to do this.

  1. Generate a sysdiagnose and AirDrop it to your computer. The sysdiagnose tarball contains a bundle called system_logs.logarchive which can be opened with Console.
  • On the device, press both volume buttons and the lock button simultaneously. Release after 1 second. You should feel the device vibrate.

  • 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.

  1. When the device is connected to your Mac over USB, you can gather logs from it using the log tool. From Terminal, run log collect --device --output logs.logarchive. Then, open logs.logarchive in Console.
like image 86
craig65535 Avatar answered Sep 28 '22 05:09

craig65535