如何打开Native层的LOGV

If you want to individually enable LOGV in your code, just add the
following #define in your cpp class ::

#define LOG_NDEBUG 0

This will enable all log levels in your code (Not the entire Android
src) : LOGE, LOGI, LOGD, LOGV, LOGW

 

这个是为什么呢?阅读源码

/framework/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.
 */
#ifndef LOG_NDEBUG
#ifdef NDEBUG
#define LOG_NDEBUG 1
#else
#define LOG_NDEBUG 0
#endif
#endif

 

在DebugFlags.java上可以打开java层的代码

你可能感兴趣的:(java,File,Class)