Return-Path: owner-new-httpd Received: by taz.hyperreal.com (8.6.10/8.6.5) id OAA14033; Tue, 21 Mar 1995 14:12:37 -0800 Received: from ooo.lanl.gov by taz.hyperreal.com (8.6.10/8.6.5) with SMTP id OAA14027; Tue, 21 Mar 1995 14:12:35 -0800 Received: by ooo.lanl.gov (1.38.193.4/16.2) id AA05305; Tue, 21 Mar 1995 15:12:31 -0700 From: Rob Hartill Message-Id: <9503212212.AA05305@ooo.lanl.gov> Subject: Re: Customizable logging 33 1/3 To: new-httpd@hyperreal.com Date: Tue, 21 Mar 95 15:12:30 MST In-Reply-To: ; from "David Robinson" at Mar 21, 95 9:32 pm Organization: Theoretical Division, T-8. Los Alamos National Laboratory Address: LANL Theoretical Divi' T-8, MS B285, P.O Box 1663, Los Alamos NM 87545 Fax: (505) 667 5585 Phone: (505) 665-2280 or 667-5336 (T-8 Secretary) Mailer: Elm [revision: 70.85] Sender: owner-new-httpd@hyperreal.com Precedence: bulk Reply-To: new-httpd@hyperreal.com > > > $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