美文网首页
adb logcat

adb logcat

作者: MiniC | 来源:发表于2018-01-02 14:15 被阅读0次

有的时候,不方便安装android studio这么大的IDE来观察日志。就需要使用adb logcat来采取日志

首先电脑需要有adb,然后adb logcat -c 来先清除日志,然后运行程序报错,adb logcat  *:E  >c:\log.txt  这个指令是把Error日志保存到log文件中。

优先级有下列集中,是按照从低到高顺利排列的: 

V — Verbose (lowest priority) 

D — Debug 

I — Info 

W — Warning 

E — Error 

F — Fatal 

S — Silent (highest priority, on which nothing is ever printed) 

如果要显示日志执行时间,多加一个time

adb logcat -v time *:E

相关文章

网友评论

      本文标题:adb logcat

      本文链接:https://www.haomeiwen.com/subject/yjgfnxtx.html