mirror of
https://github.com/hufrea/byedpi.git
synced 2024-11-20 12:25:05 +00:00
Add LOG for Android
This commit is contained in:
parent
d880b0441f
commit
9acdcfab3e
19
params.h
19
params.h
@ -5,6 +5,9 @@
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#if __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
enum demode {
|
||||
DESYNC_NONE,
|
||||
@ -44,9 +47,15 @@ struct packet {
|
||||
extern struct packet fake_tls;
|
||||
extern struct packet fake_http;
|
||||
|
||||
#define LOG_S 1
|
||||
#define LOG_L 2
|
||||
|
||||
#define LOG(s, str, ...) \
|
||||
if (params.debug >= s) printf(str, ##__VA_ARGS__)
|
||||
#if __ANDROID__
|
||||
#define LOG_S ANDROID_LOG_INFO
|
||||
#define LOG_L ANDROID_LOG_DEBUG
|
||||
#define LOG(s, str, ...) \
|
||||
__android_log_print(ANDROID_LOG_DEBUG, "ByeDPINative", str, ##__VA_ARGS__)
|
||||
#else
|
||||
#define LOG_S 1
|
||||
#define LOG_L 2
|
||||
#define LOG(s, str, ...) \
|
||||
if (params.debug >= s) printf(str, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user