httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject Re: Customizable logging 33 1/3
Date Tue, 21 Mar 1995 15:12:30 GMT
> 
> > $ENV_VAR  - whatever ENV variable the server has called "ENV_VAR"
> Is the parsing for this easy? I would recommend
> $(ENV_VAR) or ${ENV_VAR}
> so that termination of the name is clear.
> 
>  David.

Anyone know if the variables are fixed at
  [A-Z_]+

But now you mention it, it might be easier to concatinate
items if they are more easily parsed e.g.
  $A_HEADERX is ambiguous whereas $(A_HEADER)X isn't.


Now, if, at initialisation time, we can setup pointers to
all the env variables, it might be possible to preprocess
the output format string so that the parsing needn't be 
performed at the time of the logging. i.e. one could set
up list of the pointers to the ENV VARS that need to be
output, and tokenise the output string to say

  "%_ [%h:%m:%s GMT] %_ %_%_"   and the list of pointers
would point to say, REMOTE_HOST REQUEST_URL RESPONSE_CODE CONTENT_LENGTH

How would you setup the pointers ? Maybe setup a table of the
ENV VARS used in the log format and leave a blank for the
pointer to be added when the server finds it, e.g.

REMOTE_HOST    ptr
REQUEST_URL    ptr
RESPONSE_CODE  ptr
CONTENT_LENGTH ptr

as you can see, we don't have to stick to HTTP and CGI "variables",
the server can define its own. These would need to be agreed upon
among server developers.

rob

Mime
View raw message