Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to search though all xcodes logs

Tags:

xcode

ios

iphone

XCode now keeps the logs from the previous runs handy which is great.

enter image description here

Is there a way to search though all of the logs.

My use case is I have seen a particular error but cant remember which run it was in. I need to find the error URL from the logs.

like image 270
Robert Avatar asked Dec 13 '12 14:12

Robert


People also ask

How do I search log files?

For searching files, the command syntax you use is grep [options] [pattern] [file] , where “pattern” is what you want to search for. For example, to search for the word “error” in the log file, you would enter grep 'error' junglediskserver. log , and all lines that contain”error” will output to the screen.

How do I check my node logs in Kubernetes?

To get Kubectl pod logs, you can access them by adding the -p flag. Kubectl will then get all of the logs stored for the pod. This includes lines that were emitted by containers that were terminated.

How do you analyze cluster logs?

Use the cluster /log /g command at the command prompt. This command generates the cluster logs to the \windows\cluster\reports directory on each WSFC node. The advantage of this method is that you can specify the level of detail in the generated logs by using the /level option.


2 Answers

Xcode stores debug logs at

~/Library/Developer/Xcode/DerivedData/<YOURAPP>/Logs/Debug/

The .xcactivitylog files are actually just gz archives. Decompress them:

cd ~/Library/Developer/Xcode/DerivedData/<YOURAPP>/Logs/Debug/
EXT=".xcactivitylog"
for LOG in *.xcactivitylog; do
    NAME=`basename $LOG $EXT`
    gunzip -c -S $EXT "${NAME}${EXT}" > "${NAME}.log"
done

Now you can easily search them using grep or Spotlight or what your prefer.

like image 127
DrummerB Avatar answered Oct 12 '22 10:10

DrummerB


To add onto @DrummerB answer. Once the files are unziped you can do a search with custom scope from within XCode. I prefer this to grep or spotlight.

enter image description here

enter image description here

enter image description here

like image 29
Robert Avatar answered Oct 12 '22 10:10

Robert