httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@wired.com>
Subject Re: Customizable logging
Date Thu, 16 Mar 1995 23:18:41 GMT
On Thu, 16 Mar 1995, Rob McCool wrote:
> /*
>  * "Re: Customizable logging" by Rob Hartill <hartill@ooo.lanl.gov>
>  *    written Thu, 16 Mar 95 11:48:20 MST
>  * 
>  * I've already stated that I'd like a configurable log file format,
>  * but with a default which is the current standard.
>  *
>  * The format should be configurable in say httpd.conf with a string
>  * something like that used by date +f etc
>  */
> 
> We've thrown this idea around for Netsite as well. We planned to use a
> printf style string to specify which variables are logged. Maybe we
> can coordinate and make Common Log Format II?

Whereas, "Common Log Format II" isn't another exact spec for the 
logfiles, but instead a spec for the configuration variables for 
customizable log files.  I.e., here's what I could see in httpd.h:

/*
 * Customize your log files!
 * Use the following variables to construct a string which specifies 
 * the format for the entries in your log file.  The current string is
 * the default Common Log Format, which many logfile analysers understand.
 * If you change your log file format these analysers will probably not 
 * work without customization.
 *
 * %i - Hostname/IP number
 * %9 - RFC931 userid
 * %u - HTTP authentication user name
 * %d - Day of the month
 * %b - Month
 * %y - Year (without century)
 * %Y - Year with Century
 * %H - Hour 
 * %M - Minute
 * %S - Second
 * %Z - time zone
 * %r - Request Method
 * %R - Resource
 * %h - HTTP level
 * %S - Request String
 * %e - response/error code
 * %s - Bytes transferred
 * %E - Referrer
 * %z - User-Agent
 * %q - Query-String
 */

#DEFINE logstring "%i %9 %u [%d/%m/&y:%H:%M:%S %Z] "%S" %e %s"

If we can standardize on those variable names (and hopefully make them
mutually exclusive with strftime) then we'll do really well.  Hopefully 
log file analysers could be taught to look at that as well.

> We've also thrown around another idea for high-traffic servers, the
> bean count log. This log would be binary, nDBM format, and would
> record only filenames, total number of hits to that file, and a
> running total of the number of bytes sent when people requested that
> file.

That's pretty smart as well.  

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@hotwired.com  brian@hyperreal.com  http://www.hotwired.com/Staff/brian/


Mime
View raw message