what happens to NSLog info when running on a device?

前端 未结 5 1272
青春惊慌失措
青春惊慌失措 2020-12-05 04:25

what happens to NSLog info when running on a device? Where does the text go? Does it get saved? Is it therefore a big overhead when running on a device, or does it effec

5条回答
  •  死守一世寂寞
    2020-12-05 04:27

    The text is logged. You can view the logs in xcode via the (almost-invisible) disclosure triangle in the Devices window as described in another answer.

    You can also access the logs in a more usable view (including filtering) by opening Console.app on your connected Mac and selecting the device on the left.

    There will be some overhead with logging, but considering the volume of logging that's going on all the time in recent versions of iOS, unless you're generating an awful lot of output (or spending time generating the messages), it's unlikely to be significant.

提交回复
热议问题