From b339eebaefeb28ec6b9e4cac612b2f7777f21eb1 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: Thu, 19 Sep 2019 17:31:22 +0800 Subject: POST content gets logged for debugging --- post.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/post.h b/post.h index ded474e..d9844d0 100644 --- a/post.h +++ b/post.h @@ -17,6 +17,14 @@ inline void post(const char *path, const char *pairs[], size_t n) sprintf(content, "%s%s: %s\n", content, pairs[i + 1] , pair); } +#ifdef DEBUG +#ifdef ANDROID + __android_log_print(ANDROID_LOG_DEBUG, "librtclient", "%s\nContent:\n%s" + , __func__, content); +#else + fprintf(stderr, "%s\nContent:\n%s", __func__, content); +#endif // ANDROID +#endif // DEBUG struct curl_httppost *post, *last = NULL; curl_formadd(&post, &last -- cgit v1.2.3