[Groonga-commit] groonga/groonga at b61ab9d [master] logger windows: avoid confusion about pid and thread id

Back to archive index
Kentaro Hayashi null+****@clear*****
Mon Feb 4 13:19:45 JST 2019


Kentaro Hayashi	2019-02-04 13:19:45 +0900 (Mon, 04 Feb 2019)

  Revision: b61ab9d5908823fd98866c7bd059c8d2d40e3a12
  https://github.com/groonga/groonga/commit/b61ab9d5908823fd98866c7bd059c8d2d40e3a12

  Merged a740f8d: Merge pull request #898 from kenhys/fix-thread-flag-format

  Message:
    logger windows: avoid confusion about pid and thread id
    
    It makes clear which is process_id or thread_id.
    
    Before:
    
      |2436|1032:
    
    After:
      |2436|00001032:

  Modified files:
    lib/logger.c

  Modified: lib/logger.c (+1 -1)
===================================================================
--- lib/logger.c    2019-02-02 10:37:32 +0900 (5800af280)
+++ lib/logger.c    2019-02-04 13:19:45 +0900 (a413b0da8)
@@ -551,7 +551,7 @@ grn_logger_putv(grn_ctx *ctx,
                      "%s%08x", prefix, (uint32_t)pthread_self());
 #elif defined(WIN32) /* HAVE_PTHREAD_H */
         grn_snprintf(lbuf_current, lbuf_rest_size, lbuf_rest_size,
-                     "%s%ld", prefix, GetCurrentThreadId());
+                     "%s%08ld", prefix, GetCurrentThreadId());
 #endif /* HAVE_PTHREAD_H */
         lbuf_size = strlen(lbuf_current);
         lbuf_current += lbuf_size;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190204/1bac48e2/attachment.html>


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