You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2001/10/09 01:28:57 UTC

cvs commit: httpd-2.0/server log.c

rbb         01/10/08 16:28:57

  Modified:    server   log.c
  Log:
  Clean up the string passed to the error log hook. This removes the date,
  time, error level, etc strings.  The only information in the string is
  the actual error.
  Submitted by:	Jon Travis <jt...@covalent.net>
  
  Revision  Changes    Path
  1.98      +3 -2      httpd-2.0/server/log.c
  
  Index: log.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/log.c,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- log.c	2001/09/18 22:13:57	1.97
  +++ log.c	2001/10/08 23:28:57	1.98
  @@ -339,7 +339,7 @@
                              const char *fmt, va_list args)
   {
       char errstr[MAX_STRING_LEN];
  -    size_t len;
  +    size_t len, errstrlen;
       apr_file_t *logf = NULL;
       const char *referer;
       int level_and_mask = level & APLOG_LEVELMASK;
  @@ -439,6 +439,7 @@
   	len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
   		"(%d)%s: ", status, apr_strerror(status, buf, sizeof(buf)));
       }
  +    errstrlen = len;
       len += apr_vsnprintf(errstr + len, MAX_STRING_LEN - len, fmt, args);
   
       if (r && (referer = apr_table_get(r->headers_in, "Referer"))) {
  @@ -460,7 +461,7 @@
   	syslog(level_and_mask, "%s", errstr);
       }
   #endif
  -    ap_run_error_log(file, line, level, status, s, r, pool, errstr);
  +    ap_run_error_log(file, line, level, status, s, r, pool, errstr + errstrlen);
   }
       
   AP_DECLARE(void) ap_log_error(const char *file, int line, int level,