xcode 如何将 printf 输出定向到与 NSLog 相同的目标?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14387107/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to direct printf output to the same target as NSLog?
提问by Matti Jokipii
How can i make the output of printf appear in the Xcode Organizer console view? While debugging on a connected device i can see printf output right among NSLog output in th debug console in Xcode, but i can see only NSLog output on the Organizer console.
如何让 printf 的输出出现在 Xcode Organizer 控制台视图中?在连接的设备上调试时,我可以在 Xcode 的调试控制台中的 NSLog 输出中直接看到 printf 输出,但我只能在 Organizer 控制台上看到 NSLog 输出。
I'm developing in Objective-C++ and use printf for logging pure c++ code. Ultimately i wish to have this output from the app available from the time the device has been disconnected.
我正在使用 Objective-C++ 进行开发,并使用 printf 来记录纯 C++ 代码。最终,我希望从设备断开连接时起就可以使用该应用程序的输出。