温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Logcat使用总结

发布时间:2020-08-01 01:24:03 来源:网络 阅读:320 作者:chenjinli01 栏目:开发技术

1.logcat -c 清除已有log信息

2.logcat -b main 显示主缓冲区的log

  logcat -b radio 显示无线缓冲区的log

  logcat -b events 显示事件缓冲区的log

3.logcat -f [filename] 将log保存到指定的文件中,例如 logcat -b radio -f /data/radio.log

4.logcat -v 设置logcat输出的格式

  主要有7种:

  1. brief — Display priority/tag and PID of originating process (the default format).

  2. process — Display PID only.

  3. tag — Display the priority/tag only.

  4. thread — Display process:thread and priority/tag only.

  5. raw — Display the raw log message, with no other metadata fields.

  6. time — Display the date, invocation time, priority/tag, and PID of the originating process.

  7. long — Display all metadata fields and separate messages with a blank lines.

  比较常用的是显示时间:logcat -v time &

5.logcat -g 查看缓冲区的大小

  logcat -g main

  logcat -g radio

  logcat -g events

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI