首页 > 移动平台 > 详细

ios iphone 将log在终端输出

时间:2015-02-13 15:59:00      阅读:302      评论:0      收藏:0      [点我收藏+]

对于模拟器,其在终端的log文件位于:   ~/Library/Logs/CoreSimulator/C4B94BA6-EF08-4AD2-AE7D-1A3A2E2AC545/system.log

 

对于真机:

Here‘s another tip using the great libimobiledevice library http://www.libimobiledevice.org/, originally built to manage iOS devices on Linux.
 
This method shows you how you can view the log output (e.g. what you see in Xcode when running in debug mode) on any app, whether it‘s an AppStore build or an AdHoc build.
 
Some apps are more talkative than others - it all depends on how careful the developers were to remove log messages in release builds.
 
I find this most useful for debugging issues in release versions of our apps. If a user reports a sequence of actions causes a crash, you can try this out while watching the log from your app.

Here‘s how:

 
Connect your device, open up Terminal.app and type:
 
idevicesyslog
 
Up pops a real-time display of the device‘s system log.

With it being a console app, you can filter the log using unix commands, such as grep


For instance, see all log messages from a particular app:

idevicesyslog | grep myappname

ios iphone 将log在终端输出

原文:http://www.cnblogs.com/welhzh/p/4290260.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!