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

Diff for /src/usr.bin/cvs/log.c between version 1.7 and 1.8

version 1.7, 2004/12/07 17:10:56 version 1.8, 2004/12/15 06:11:40
Line 95 
Line 95 
         cvs_log_filters[LP_DEBUG] = 1;          cvs_log_filters[LP_DEBUG] = 1;
         cvs_log_filters[LP_INFO] = 1;          cvs_log_filters[LP_INFO] = 1;
   
           /* traces are enabled with the -t command-line option */
           cvs_log_filters[LP_TRACE] = 1;
   
         if (dest & LD_SYSLOG) {          if (dest & LD_SYSLOG) {
                 slopt = 0;                  slopt = 0;
   
Line 212 
Line 215 
         if (level > LP_MAX)          if (level > LP_MAX)
                 return (-1);                  return (-1);
   
   
         /* apply any filters */          /* apply any filters */
         if (cvs_log_filters[level] != 0)          if (cvs_log_filters[level] != 0)
                 return (0);                  return (0);
Line 224 
Line 226 
   
 #ifdef CVS  #ifdef CVS
         /* The cvs program appends the command name to the program name */          /* The cvs program appends the command name to the program name */
         if (cvs_command != NULL) {          if (level == LP_TRACE) {
                   strlcpy(prefix, " -> ", sizeof(prefix));
                   if (cvs_cmdop == CVS_OP_SERVER)
                           prefix[0] = 'S';
           } else if (cvs_command != NULL) {
                 if (level == LP_ABORT)                  if (level == LP_ABORT)
                         snprintf(prefix, sizeof(prefix), "%s [%s aborted]",                          snprintf(prefix, sizeof(prefix), "%s [%s aborted]",
                             __progname, cvs_command);                              __progname, cvs_command);
Line 235 
Line 241 
 #endif  #endif
                 strlcpy(prefix, __progname, sizeof(prefix));                  strlcpy(prefix, __progname, sizeof(prefix));
   
         if (cvs_log_flags & LF_PID) {          if ((cvs_log_flags & LF_PID) && (level != LP_TRACE)) {
                 snprintf(buf, sizeof(buf), "[%d]", (int)getpid());                  snprintf(buf, sizeof(buf), "[%d]", (int)getpid());
                 strlcat(prefix, buf, sizeof(prefix));                  strlcat(prefix, buf, sizeof(prefix));
         }          }
Line 262 
Line 268 
                 }                  }
 #endif  #endif
   
                 fprintf(out, "%s: %s\n", prefix, buf);                  fputs(prefix, out);
                   if (level != LP_TRACE)
                           fputs(": ", out);
                   fputs(buf, out);
                   fputc('\n', out);
         }          }
   
         if (cvs_log_dest & LD_SYSLOG)          if (cvs_log_dest & LD_SYSLOG)

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