当我从XCode运行我的UI测试套件时,我得到的日志非常有用,几乎完全包含了我正在尝试与之交互的元素以及屏幕上的元素的信息。
当我使用Fastlane运行带有keep-the-logs-around
选项的UI测试套件时,日志看起来大概如下:
13:52:03.660 xcodebuild[10946:917312] (LOG ARBITER) Rotating message buffer with 388 messages.
...
13:53:24.666 xcodebuild[10946:916508] (LOG ARBITER) Rotating message buffer with 825 messages.
13:53:26.514 xcodebuild[10946:917191] (LOG ARBITER) Dumping buffered message data; 21669 messages.
实际上的日志位看起来像这样:
14:28:28.074 XCTRunner[10957:916546] <XCTWaiter: 0x608000011280> entering wait loop for 0.20s
14:28:28.166 XCTRunner[10957:926899] <XCTWaiter: 0x608000010470> watchdog first trigger, clearing _XCWaitLoopIsValid and waking other waiters
14:28:28.166 XCTRunner[10957:928326] <XCTWaiter: 0x608000010390> watchdog second trigger, weakWaiter: (null)
14:28:28.271 XCTRunner[10957:928326] <XCTWaiter: 0x6080000100d0> watchdog second trigger, weakWaiter: (null)
14:28:28.271 XCTRunner[10957:928386] <XCTWaiter: 0x60000001ee60> watchdog second trigger, weakWaiter: (null)
以及在通过xcode运行时显示如上所述的实际有用信息。
是否有某种方法可以降低日志的日志记录级别,以便我不会得到所有这些噪音?