1. In the beginning of the file, after the last "#include" line, add following:
#include <utils/Log.h>
#undef LOG_TAG
#define LOG_TAG "YOUR_MODULE_NAME"
#undef PVLOGGER_LOGMSG
#define PVLOGGER_LOGMSG(IL, LOGGER, LEVEL, MESSAGE) JJLOGE MESSAGE
#define JJLOGE(id, ...) LOGE(__VA_ARGS__)
2. In the end of the file, add these:
#undef PVLOGGER_LOGMSG
#define PVLOGGER_LOGMSG(IL, LOGGER, LEVEL, MESSAGE) OSCL_UNUSED_ARG(LOGGER);
You can play with the macro to filter based on level too.
From http://omappedia.org/wiki/Android_Debugging#Selectively_Enable_Opencore_Debug_Print
沒有留言:
張貼留言