[BACK]Return to log.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/log.c between version 1.13 and 1.14

version 1.13, 2015/08/28 12:15:54 version 1.14, 2015/08/29 00:24:44
Line 66 
Line 66 
 void  void
 log_vwrite(const char *msg, va_list ap)  log_vwrite(const char *msg, va_list ap)
 {  {
         char    *fmt;          char            *fmt;
         time_t   t;          struct timeval   tv;
   
         if (log_file == NULL)          if (log_file == NULL)
                 return;                  return;
   
         t = time(NULL);          gettimeofday(&tv, NULL);
         if (asprintf(&fmt, "%lld %s\n", (long long)t, msg) == -1)          if (asprintf(&fmt, "%lld.%06d %s\n", (long long)tv.tv_sec,
               (int)tv.tv_usec, msg) == -1)
                 exit(1);                  exit(1);
         if (vfprintf(log_file, fmt, ap) == -1)          if (vfprintf(log_file, fmt, ap) == -1)
                 exit(1);                  exit(1);

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14