Kouhei Sutou
null+****@clear*****
Fri May 6 16:00:24 JST 2016
Kouhei Sutou 2016-05-06 16:00:24 +0900 (Fri, 06 May 2016) New Revision: a1f1efd1705a8325d8495857f66ae8facdef7801 https://github.com/groonga/groonga/commit/a1f1efd1705a8325d8495857f66ae8facdef7801 Message: Add internal grn_report_index_not_used() function Modified files: lib/grn_report.h lib/report.c Modified: lib/grn_report.h (+6 -0) =================================================================== --- lib/grn_report.h 2016-05-06 15:45:39 +0900 (4211ec0) +++ lib/grn_report.h 2016-05-06 16:00:24 +0900 (a514e46) @@ -31,6 +31,12 @@ void grn_report_index(grn_ctx *ctx, const char *tag, grn_obj *index); +void grn_report_index_not_used(grn_ctx *ctx, + const char *action, + const char *tag, + grn_obj *index, + const char *reason); + #ifdef __cplusplus } #endif Modified: lib/report.c (+20 -0) =================================================================== --- lib/report.c 2016-05-06 15:45:39 +0900 (3d134cc) +++ lib/report.c 2016-05-06 16:00:24 +0900 (9305d0b) @@ -38,3 +38,23 @@ grn_report_index(grn_ctx *ctx, "%s[index]%s <%.*s>", action, tag, index_name_size, index_name); } + +void +grn_report_index_not_used(grn_ctx *ctx, + const char *action, + const char *tag, + grn_obj *index, + const char *reason) +{ + char index_name[GRN_TABLE_MAX_KEY_SIZE]; + int index_name_size; + + if (!grn_logger_pass(ctx, GRN_REPORT_INDEX_LOG_LEVEL)) { + return; + } + + index_name_size = grn_obj_name(ctx, index, index_name, GRN_TABLE_MAX_KEY_SIZE); + GRN_LOG(ctx, GRN_REPORT_INDEX_LOG_LEVEL, + "%s[index-not-used]%s <%.*s>: %s", + action, tag, index_name_size, index_name, reason); +} -------------- next part -------------- HTML����������������������������... ダウンロード