#ifndef LIB_DEFAULT_LOG_H #define LIB_DEFAULT_LOG_H #include #define LOG(...) __android_log_print(ANDROID_LOG_DEBUG, "LIBDEFAULTPROXY", __VA_ARGS__) #define LOGFUNCTION() __android_log_print(ANDROID_LOG_DEBUG, "LIBDEFAULTPROXY", "%s", __FUNCTION__) #define LOGBUF(buffer, buffer_sz) char buf[buffer_sz * 3 + 2]; \ char *out_p = buf;\ const unsigned char *const in_p = (void*)buffer;\ for (int i = 0; i < buffer_sz; i++) { \ sprintf(out_p, " %02x", in_p[i]); \ out_p += 3; \ } \ LOG("%s", buf); #endif // LIB_DEFAULT_LOG_H