Add logs for debugging message body 55/150755/1 accepted/tizen/unified/20170920.081233 submit/tizen/20170918.114609
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 18 Sep 2017 11:20:17 +0000 (20:20 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 18 Sep 2017 11:21:25 +0000 (20:21 +0900)
Change-Id: Ia6f19fe45d715662f87e2c13dd8900375509e17e
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
libsoup/soup-message-io.c
libsoup/soup-message.c

index 2587a7c..38c0826 100644 (file)
@@ -662,6 +662,12 @@ io_read (SoupMessage *msg, gboolean blocking,
 
 
        case SOUP_MESSAGE_IO_STATE_BODY_START:
+#if ENABLE(TIZEN_DLOG)
+               uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE);
+               TIZEN_LOGI("[BGN] soup_io_r_body : %s", uri);
+               g_free(uri);
+               uri = NULL;
+#endif
                if (!io->body_istream) {
                        GInputStream *body_istream = soup_body_input_stream_new (G_INPUT_STREAM (io->istream),
                                                                                 io->read_encoding,
@@ -736,6 +742,12 @@ io_read (SoupMessage *msg, gboolean blocking,
                                                blocking,
                                                cancellable, error);
                if (nread > 0) {
+#if ENABLE(TIZEN_DLOG)
+                       uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE);
+                       TIZEN_LOGI("[EVT] soup_io_r_body : %ld bytes", nread);
+                       g_free(uri);
+                       uri = NULL;
+#endif
                        buffer->length = nread;
                        soup_message_body_got_chunk (io->read_body, buffer);
                        soup_message_got_chunk (msg, buffer);
@@ -753,6 +765,12 @@ io_read (SoupMessage *msg, gboolean blocking,
 
 
        case SOUP_MESSAGE_IO_STATE_BODY_DONE:
+#if ENABLE(TIZEN_DLOG)
+               uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE);
+               TIZEN_LOGI("[END] soup_io_r_body : %s", uri);
+               g_free(uri);
+               uri = NULL;
+#endif
                io->read_state = SOUP_MESSAGE_IO_STATE_FINISHING;
                soup_message_got_body (msg);
                break;
index e311155..e307083 100755 (executable)
@@ -1190,13 +1190,29 @@ soup_message_got_headers (SoupMessage *msg)
 void
 soup_message_got_chunk (SoupMessage *msg, SoupBuffer *chunk)
 {
+#if ENABLE(TIZEN_DLOG)
+       char *uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE);
+#endif
        g_signal_emit (msg, signals[GOT_CHUNK], 0, chunk);
+#if ENABLE(TIZEN_DLOG)
+       TIZEN_LOGI("[EVT] GOT_CHUNK signal : %s", uri);
+       g_free(uri);
+       uri = NULL;
+#endif
 }
 
 void
 soup_message_got_body (SoupMessage *msg)
 {
+#if ENABLE(TIZEN_DLOG)
+       char *uri = soup_uri_to_string(soup_message_get_uri(msg), FALSE);
+#endif
        g_signal_emit (msg, signals[GOT_BODY], 0);
+#if ENABLE(TIZEN_DLOG)
+       TIZEN_LOGI("[EVT] GOT_BODY signal : %s", uri);
+       g_free(uri);
+       uri = NULL;
+#endif
 }
 
 void
@@ -1225,7 +1241,7 @@ soup_message_finished (SoupMessage *msg)
        TIZEN_LOGI("[EVT] soup_msg_fin : %s", uri);
 #endif
 #if ENABLE(TIZEN_PERFORMANCE_TEST_LOG)
-       prctl_with_url("[EVT] soup_msg_fin : ", uri);
+       prctl_with_url("[EVT] soup_msg_fin : %s", uri);
 #endif
        g_free(uri);
 #endif