httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@avron.ICS.UCI.EDU>
Subject E30 update
Date Tue, 23 May 1995 06:14:09 GMT
Brian's patch seems a bit off in the replacement of newlines with tabs
<http://www.apache.org/httpd/patches/for_Apache_0.6.4/
                                     E30.error_log_extensions.txt>:

--- 267,287 ----
  }
  
  void log_error(char *err) {
!     fprintf(error_log, "[%s] %s",get_time(),err);
!     if(useragent[0] && strncmp(err, "httpd: send timed out", 21))
!       fprintf(error_log,"\tUser-Agent: %s",useragent);
!     if(referer[0] && strncmp(err, "httpd: send timed out", 21))
!       fprintf(error_log,"\tReferer: %s",referer);    
!     fprintf(error_log,"\n");    
      fclose(error_log);
  }
  
  void log_error_noclose(char *err) {
      fprintf(error_log, "[%s] %s\n",get_time(),err);
+     if(useragent[0])
+       fprintf(error_log,"    User-Agent: %s\n",useragent);
+     if(referer[0])
+       fprintf(error_log,"    Referer: %s\n",referer);    
      fflush(error_log);
  }


Note that the second routine still uses \n.  You may also want to
save space by using "UA:" and "REF:" instead of the longer names.
I assume that you are making the same changes to the check_error_log
program I sent out.

One thing to put on the wish list for Apache 2.0 is a properly
organized and consistant error log.

......Roy

Mime
View raw message