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.

在Android 4.1系统中,log的控制主要通过宏定义实现,如LOG_NDEBUG, LOG_NIDEBUG和LOG_NDDEBUG,用于在release版本中过滤ALOGV(VERBOSE)消息。LOG_TAG用于指定日志标签。系统程序的日志通常输出到/dev/log/设备,可以通过logcat查看。对于init启动的程序,可以通过logwrapper服务或添加console来显示log信息。"
39994603,2818069,Qt中的QRegExp正则表达式使用教程,"['Qt开发', '正则表达式']
3522

被折叠的 条评论
为什么被折叠?



