From 54d9e73d76270fe6e635a71db2dc1476d1be99ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Fri, 20 Sep 2019 08:44:55 +0800 Subject: More complete logging for not OK status --- ticket.c | 9 +++++++-- user.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ticket.c b/ticket.c index 75a00e5..1c96e4c 100644 --- a/ticket.c +++ b/ticket.c @@ -80,8 +80,13 @@ static size_t search_callback(void *contents, size_t size, size_t nmemb free(*listptr); *listptr = NULL; #ifdef DEBUG - fprintf(stderr, "%s response status: %s\n", __func__, line); -#endif +#ifdef ANDROID + __android_log_print(ANDROID_LOG_INFO, "librtclient" + , "%s response status:\n%s", __func__, error); +#else + printf("%s response status:\n%s\n", __func__, line); +#endif // ANDROID +#endif // DEBUG } return realsize; diff --git a/user.c b/user.c index 804223a..9bfdf96 100644 --- a/user.c +++ b/user.c @@ -167,8 +167,13 @@ static size_t show_callback(void *contents, size_t size, size_t nmemb free(*userptr); *userptr = NULL; #ifdef DEBUG - fprintf(stderr, "%s response status: %s\n", __func__, line); -#endif +#ifdef ANDROID + __android_log_print(ANDROID_LOG_INFO, "librtclient" + , "%s response status:\n%s", __func__, error); +#else + printf("%s response status:\n%s\n", __func__, line); +#endif // ANDROID +#endif // DEBUG } return realsize; -- cgit v1.2.3