15 lines
606 B
C
15 lines
606 B
C
#ifndef LIB_DEFAULT_LOG_H
|
|
#define LIB_DEFAULT_LOG_H
|
|
|
|
#include <android/log.h>
|
|
#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
|