[Groonga-commit] groonga/groonga [master] [msgpack] add debug log. refs #1215

Back to archive index

null+****@clear***** null+****@clear*****
2011年 12月 19日 (月) 14:39:52 JST


Yoji SHIDARA	2011-12-19 05:39:52 +0000 (Mon, 19 Dec 2011)

  New Revision: 3c1481a65271e939216d616e1028219aa8e8e2ce

  Log:
    [msgpack] add debug log. refs #1215

  Modified files:
    lib/output.c

  Modified: lib/output.c (+12 -0)
===================================================================
--- lib/output.c    2011-12-19 05:15:20 +0000 (af898e3)
+++ lib/output.c    2011-12-19 05:39:52 +0000 (371407a)
@@ -81,6 +81,12 @@ grn_output_array_open(grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_typ
     break;
   case GRN_CONTENT_MSGPACK :
 #ifdef HAVE_MESSAGE_PACK
+    if (nelements < 0) {
+      GRN_LOG(ctx, GRN_LOG_DEBUG,
+          "grn_output_array_open nelements (%d) for <%s>",
+          nelements,
+          name);
+    }
     msgpack_pack_array(&ctx->impl->msgpacker, nelements);
 #endif
     break;
@@ -142,6 +148,12 @@ grn_output_map_open(grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type,
     break;
   case GRN_CONTENT_MSGPACK :
 #ifdef HAVE_MESSAGE_PACK
+    if (nelements < 0) {
+      GRN_LOG(ctx, GRN_LOG_DEBUG,
+          "grn_output_map_open nelements (%d) for <%s>",
+          nelements,
+          name);
+    }
     msgpack_pack_map(&ctx->impl->msgpacker, nelements / 2);
 #endif
     break;




Groonga-commit メーリングリストの案内
Back to archive index