How to print log messages with in Android framework

前端 未结 5 884
清歌不尽
清歌不尽 2021-01-19 06:57

I am trying to print log messages within core Android framework files. For example, I tried logging messages within MediaRecorderClient.cpp under framewor

5条回答
  •  佛祖请我去吃肉
    2021-01-19 07:15

    /system/core/include/cutils/log.h defines the macros for logging in the Android Framework.

    So you uncomment the line that says #define LOG_NDEBUG 0 at the top of the source file and it will enable VERBOSE logging. You will need to recompile that entire library and put it into your android system.img build.

    I believe the macro calls are ALOGV, ALOGE and so on.

    It is similar to this other answer:

    How to get Verbose logging in logcat for a specific module

提交回复
热议问题