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

android命令抓LOG

时间:2016-03-03 14:52:04      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

手机和电脑,在电脑上开3个命令窗口,分别输入如下3个命令分别抓取mainLog、radioLog和kernalLog
adb logcat -v time >main.txt
adb logcat -v time -b radio >radio.txt
adb shell cat proc/kmsg >uart.txt
如果是抓取开机Log,可以先输入命令等待设备,在开机。

------------------------------------------

在代码中对Log输出会有判断如:

if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {
       Log.v(TAG, "onSizeChanged: w=" + width + " h=" + height + " oldw=" + oldWidth + " oldh=" + oldHeight);
}

如果APP默认关闭了Log.VERBOSE,用命令adb shell setprop log.tag.APP V 开启Log.VERBOSE。然后再抓Log。

android命令抓LOG

标签:

原文地址:http://www.cnblogs.com/antoon/p/5238407.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!