]> granicus.if.org Git - imagemagick/commitdiff
Add log format special char %i (thread-id) to "human readable" mode (#1583)
authorhadashiA <dev@hadashikick.jp>
Fri, 31 May 2019 18:24:39 +0000 (03:24 +0900)
committerImageMagick <urban-warrior@users.noreply.github.com>
Fri, 31 May 2019 18:24:39 +0000 (14:24 -0400)
MagickCore/log.c

index f75191c348f9d88510b7f651c6457c48fc91d29d..e7da076270fc4c08a67f25ff978fc66cc8b0dd07 100644 (file)
@@ -1033,6 +1033,7 @@ static char *TranslateEvent(const char *module,const char *function,
         %e   event
         %f   function
         %g   generation
+        %i   thread id
         %l   line
         %m   module
         %n   log name
@@ -1097,6 +1098,11 @@ static char *TranslateEvent(const char *module,const char *function,
           log_info->generations));
         break;
       }
+      case 'i':
+      {
+        q += FormatLocaleString(q, extent, "%.20g", (double) GetMagickThreadSignature());
+        break;
+      }
       case 'l':
       {
         q+=FormatLocaleString(q,extent,"%.20g",(double) line);