Android4.1中,log有了一些打印,具体可以参考system/core/include/cutils/log.h
1. 下面是控制哪些log输出的宏
/*
* Normally we strip ALOGV (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.
*/
#ifndef LOG_NDEBUG
#ifdef NDEBUG
#define LOG_NDEBUG 1
#else
#define LOG_NDEBUG 0
#endif
#endif
#ifndef LOG_NIDEBUG
#ifdef NDEBUG
#define LOG_NIDEBUG 1
#else
#define LOG_NIDEBUG 0
#endif
#endif
#ifndef LOG_NDDEBUG
#ifdef NDEBUG
#define LOG_NDDEBUG 1
#else
#define LOG_NDDEBUG 0
#endif
2.