zoukankan      html  css  js  c++  java
  • Android logcat lines missing原因分析

    当出现类似如下错误日志时:

    2019-04-14 17:51:14.506 10189-10189/com.ss.android.ex.parent D/GGK: no WonderfulVideo

    2019-04-14 17:51:14.506 10189-10189/com.ss.android.ex.parent I/chatty: uid=10774(u0_a774) com.ss.android.ex.parent identical 5 lines

    2019-04-14 17:51:14.506 10189-10189/chatty D/GGK: no WonderfulVideo

    2019-04-14 17:51:14.506 10189-10189/com.ss.android.ex.parent D/GGK: has WonderfulVideo

    2019-04-14 17:51:14.506 10189-10189/com.ss.android.ex.parent I/chatty: uid=10774(u0_a774) com.ss.android.ex.parent identical 1 line

    2019-04-14 17:51:14.506 10189-10189/com.ss.android.ex.parent D/GGK: has WonderfulVideo

     

    是因为相邻的几行打印内容完全相同,从Android O开始Log的chatty机制,会把中间的重复内容去掉不再打印。而是打印类似如上的 ”identical 5 lines“ ,告知开发者去除了几行

     

    这个删除操作是在Android源码的 /system/core/logd/LogBufferElement.cpp 文件中实现的,类似的还有一个  expire x lines  日志

     

     

    相关logcat 选项参考 https://www.jianshu.com/p/3fce87f12bb9   

    https://blog.csdn.net/kennethyo/article/details/76603228  设置黑白名单(好像意思是通过设置白名单可以避免删减日志,未实验)==>设置黑白名单好像是无效的,简单试了一次。

    修改prop中的值应该可行(未实验,手机需Root)

    setprop ro.logd.filter disable
    setprop persist.logd.filter disable

     

     

    日志处理侧源码分析:https://blog.csdn.net/kc58236582/article/details/51506896

  • 相关阅读:
    db2新添用户
    merge的用法
    oracle常用命令
    oracle建用户
    获得当前时间的PRO
    全部快捷方式图标变成LNK文件怎么办
    随机生成数据的三种方法
    db2查看表空间
    db2疑难解决
    AVG()和to_date()函数的使用
  • 原文地址:https://www.cnblogs.com/genggeng/p/10706379.html
Copyright © 2011-2022 走看看