有没有人会搜索全部log日志?

目前的Xcode中的日志运行都正常

enter image description here

有没有能搜索全部这些log的方法?

我记得以前发现过一个错误,不记得是哪个了,我要找到错误的URL地址。

推荐使用Ack,比grep还方便,可以在指定文件夹里搜索指定文本,支持正则。

Xcode中的调试日志都存储在这里:

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

.xcactivitylog文件是gz文档,解压:

~/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

然后可以用grep或者Spotlight进行搜索了.