[Groonga-commit] groonga/groonga at 82ad057 [master] ii: reduce needless execution for debug log

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 17 23:46:49 JST 2016


Kouhei Sutou	2016-10-17 23:46:49 +0900 (Mon, 17 Oct 2016)

  New Revision: 82ad05792bc5efa6327d7f159eac6e7e7e27c877
  https://github.com/groonga/groonga/commit/82ad05792bc5efa6327d7f159eac6e7e7e27c877

  Message:
    ii: reduce needless execution for debug log

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+5 -0)
===================================================================
--- lib/ii.c    2016-10-17 23:44:50 +0900 (dc85ae6)
+++ lib/ii.c    2016-10-17 23:46:49 +0900 (83cd8c2)
@@ -2211,6 +2211,11 @@ buffer_term_dump(grn_ctx *ctx, grn_ii *ii, buffer *b, buffer_term *bt)
   int pos, rid, sid;
   uint8_t *p;
   buffer_rec *r;
+
+  if (!grn_logger_pass(ctx, GRN_LOG_DEBUG)) {
+    return;
+  }
+
   GRN_LOG(ctx, GRN_LOG_DEBUG,
           "b=(%x %u %u %u)", b->header.chunk, b->header.chunk_size,
           b->header.buffer_free, b->header.nterms);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index