[gnome-builder] jsonrpc: add debugging on stream output



commit f34545d41951b4838fe4ba54f086b1be5a27527d
Author: Christian Hergert <chergert redhat com>
Date:   Sat Mar 18 03:59:51 2017 -0700

    jsonrpc: add debugging on stream output

 contrib/jsonrpc-glib/jsonrpc-output-stream.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/contrib/jsonrpc-glib/jsonrpc-output-stream.c b/contrib/jsonrpc-glib/jsonrpc-output-stream.c
index b37198c..c970dc9 100644
--- a/contrib/jsonrpc-glib/jsonrpc-output-stream.c
+++ b/contrib/jsonrpc-glib/jsonrpc-output-stream.c
@@ -164,10 +164,11 @@ jsonrpc_output_stream_create_bytes (JsonrpcOutputStream  *self,
 
   buffer = g_byte_array_sized_new (g_variant_get_size (message) + 128);
 
-#if 0
   if G_UNLIKELY (jsonrpc_output_stream_debug)
-    g_message (">>> %s", str);
-#endif
+    {
+      g_autofree gchar *str = g_variant_print (message, TRUE);
+      g_message (">>> %s", str);
+    }
 
   if (priv->use_gvariant)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]