I'm running the mediaplayer of android and i would like to see the
LOGV generated by mediaplayer, but they do not appear in logcat.
these logs are stored in a file? how can I debug them?
Regards,
André Barbosa.
So, I define in a myLogMacro.h file :
#ifndef MY_LOG_MACRO_H
#define MY_LOG_MACRO_H
#include <android/log.h>
//redefinition des macros
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE,
"MY_LOG_TAG", __VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG ,
"MY_LOG_TAG", __VA_ARGS__)
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO ,
"MY_LOG_TAG", __VA_ARGS__)
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN ,
"MY_LOG_TAG", __VA_ARGS__)
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR ,
"MY_LOG_TAG", __VA_ARGS__)
#endif // MY_LOG_MACRO_H
Then, include this myLogMacro.h file in the other CPP files and call
LOGV, LOGD... like this to get log in LogCat :
LOGV("A message with str=%s and int=%d", "a string", 3)
André Barbosa a écrit :
Someone already did this change? what i have to modify in log.h to
activate all logs (LOGE, LOGI, LOGD, LOGV, LOGW)?
Regards,
André Barbosa