[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.8 and 1.9

version 1.8, 2012/05/30 15:01:21 version 1.9, 2014/03/31 21:42:05
Line 41 
Line 41 
 void  void
 log_event_cb(unused int severity, const char *msg)  log_event_cb(unused int severity, const char *msg)
 {  {
         log_warnx("%s", msg);          log_debug("%s", msg);
 }  }
   
 /* Open logging to file. */  /* Open logging to file. */
Line 84 
Line 84 
                 exit(1);                  exit(1);
         fflush(log_file);          fflush(log_file);
         free(fmt);          free(fmt);
 }  
   
 /* Log a warning with error string. */  
 void printflike1  
 log_warn(const char *msg, ...)  
 {  
         va_list  ap;  
         char    *fmt;  
   
         va_start(ap, msg);  
         if (asprintf(&fmt, "%s: %s", msg, strerror(errno)) == -1)  
                 exit(1);  
         log_vwrite(fmt, ap);  
         free(fmt);  
         va_end(ap);  
 }  
   
 /* Log a warning. */  
 void printflike1  
 log_warnx(const char *msg, ...)  
 {  
         va_list ap;  
   
         va_start(ap, msg);  
         log_vwrite(msg, ap);  
         va_end(ap);  
 }  
   
 /* Log an informational message. */  
 void printflike1  
 log_info(const char *msg, ...)  
 {  
         va_list ap;  
   
         if (log_level > -1) {  
                 va_start(ap, msg);  
                 log_vwrite(msg, ap);  
                 va_end(ap);  
         }  
 }  }
   
 /* Log a debug message. */  /* Log a debug message. */

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9