[Groonga-commit] groonga/groonga at 18eaffc [master] Update ctx->errlog after logging

Back to archive index
Kouhei Sutou null+****@clear*****
Mon Jan 21 11:08:22 JST 2019


Kouhei Sutou	2019-01-21 11:08:22 +0900 (Mon, 21 Jan 2019)

  Revision: 18eaffc65fb9e80d62d1a692f74e50c7bb5bec52
  https://github.com/groonga/groonga/commit/18eaffc65fb9e80d62d1a692f74e50c7bb5bec52

  Message:
    Update ctx->errlog after logging
    
    Because logging may use ctx->errlog in its message.

  Modified files:
    lib/grn_ctx.h

  Modified: lib/grn_ctx.h (+1 -1)
===================================================================
--- lib/grn_ctx.h    2019-01-21 10:59:51 +0900 (51eebaf3d)
+++ lib/grn_ctx.h    2019-01-21 11:08:22 +0900 (7d3316f60)
@@ -125,12 +125,12 @@ GRN_API void grn_ctx_impl_set_current_error_message(grn_ctx *ctx);
   ctx_->errfile = __FILE__;\
   ctx_->errline = __LINE__;\
   ctx_->errfunc = __FUNCTION__;\
-  grn_ctx_log(ctx, __VA_ARGS__);\
   if (grn_ctx_impl_should_log(ctx)) {\
     grn_ctx_impl_set_current_error_message(ctx);\
     GRN_LOG(ctx, lvl, __VA_ARGS__);\
     if (lvl <= GRN_LOG_ERROR) { LOGTRACE(ctx, lvl); }\
   }\
+  grn_ctx_log(ctx, __VA_ARGS__);\
 } while (0)
 
 #define ERRP(ctx,lvl) \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190121/2d2ceb83/attachment.html>


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