通过adb logcat,默认是不输出LOGV的,只输出LOGE级别的log,怎么设置才看到LOGV的log信息?

解决方案 »

  1.   

    把LOGV定义为LOGE了#ifdef LOGV
    #undef LOGV
    #endif
    #define LOGV LOGE
      

  2.   

    Log的默认级别是v  不是e
    可以直接用adb logcat 查看log
      

  3.   

    adb logcat只能看到应用层的log.v,看不到中间层的LOGV
      

  4.   

    logcat 都看不到的就不叫log 了。
    jni的log都是通过logcat看的
    kernal的log 不能通过logcat看
      

  5.   


    ???
    怎么会……  v d i e 都可以看到……
      

  6.   

    别说中间层,就是驱动的log都看的到。 只有内核的printk要dmesg
      

  7.   

    那需要做什么指定才能输出i,v级别的log?
    我是通过在终端执行adb logcat查看的,或者通过adb logcat > a.txt输出到文件中的。
    没有使用eclipse查看。
      

  8.   

    是通过#include <utils/Log.h>引入的log头文件。
      

  9.   


    USB连接设备,在终端adb logcat吗?
    我还很纳闷怎么会看不到呢 没遇到过你这个情况啊 我一直都这么看的……
    跟一下LOGV的 define是怎么定义的 print arg一堆的那定义 我看看
     应该都一样啊…… - -!! 费解……
      

  10.   

    参见system/core/include/cutils/Log.h中有注释说明
    /*
     * Normally we strip LOGV (VERBOSE messages) from release builds.
     * You can modify this (for example with "#define LOG_NDEBUG 0"
     * at the top of your source file) to change that behavior.
     */所以应该是在你的代码中,#include <utils/Log.h>之前,先#define LOG_NDEBUG 0