Re: Configurable log proposal

Kevin 'Kev' Hughes ([email protected])
Tue, 1 Feb 94 13:58:10 PST


Ari ([email protected]) writes:

> How about having a fully configurable log files, something
> that would understand escapes like this:
>
> Time:
> %a abbreviated weekday name
> %b abbreviated month name
> %d day of month
> ...
>
> ...and what else? I would be happy to implement this. Maybe the %letters
> could be selected in a better way and not respect the ones strftime()
> uses.

I really like the idea - in a log analyzing program, the user
can define their log format in some sort of format string, and all
that's needed is some sort of generic sscanf() function. Once something is
agreed upon, I'll certainly (try to) write one for my analyzer.
How about escapes for a status flag, such as

Whether a file/script was found
Unknown failure
Successful (appears to have sent the request)

...and breaking down the request pathname (full, url, or partial),
and one generic escape for miscellaneous (unknown) data known only to the
server. This would allow a person to define by escapes logs like:

hymir.ifi.uio.no [Sat Oct 30 00:17:42 1993] GET /help/modem.html HTTP/1.0

(site, date, method, partial path, protocol)

hymir.ifi.uio.no [Sat Oct 30 00:17:42 1993] GET http://site.com/help/modem.html HTTP/1.0

(site, date, method, url, protocol)

hymir.ifi.uio.no [Sat Oct 30 00:17:42 1993] HEAD /usr/local/www/help/modem.html HTTP/1.0

(site, date, method, full path, protocol)

doboj.cca.vu.nl: Sent cache (GET /1/mathdir): Sun Oct 31 11:44:12 1993
doboj.cca.vu.nl: Sent binary (GET /9/newton.gif): Sun Oct 31 12:26:42 1993

(site, miscellaneous data, method, partial path, date)

-- Kevin