码迷,mamicode.com
首页 > 移动开发 > 详细

ios iphone 将log在终端输出

时间:2015-02-13 15:59:37      阅读:193      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!