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 effectively get sent to null?
Your device will continue logging even when it's not connected to your mac. To see the logs, you need to open Xcode, click the 'Window' menu item, and then 'Organizer'. Then select your device and then select the 'Device Logs' tab. For some reason (for me at least) viewing the logs seems flaky, so if nothing shows up, you may need to completely quit Xcode and restart it.
console
-- same organizer window. –
Eddington Since Xcode 6 the device manager pane has been split into its own window. (Window > Devices, or Command-Shift-2.)
Once there, select your device, then show its log by clicking the disclosure triangle at the bottom of the window to the right of the sidebar.
Your device will continue logging even when it's not connected to your mac. To see the logs, you need to open Xcode, click the 'Window' menu item, and then 'Organizer'. Then select your device and then select the 'Device Logs' tab. For some reason (for me at least) viewing the logs seems flaky, so if nothing shows up, you may need to completely quit Xcode and restart it.
console
-- same organizer window. –
Eddington 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.
It gets written to the Console log on the device. You can read it in the "Organizer" within Xcode when your device is connected.
It gets logged out. You can retrieve it by connecting the device and looking in the organizing in xcode
© 2022 - 2024 — McMap. All rights reserved.