Received: (qmail 17089 invoked by uid 2012); 14 Oct 1998 09:09:29 -0000 Message-Id: <19981014090929.17088.qmail@hyperreal.org> Date: 14 Oct 1998 09:09:29 -0000 From: Mark Nottingham Reply-To: mnot@pobox.com To: apbugs@hyperreal.org Subject: request for conditional in mod_log_config X-Send-Pr-Version: 3.2 >Number: 3205 >Category: mod_log-any >Synopsis: request for conditional in mod_log_config >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: change-request >Submitter-Id: apache >Arrival-Date: Wed Oct 14 02:10:00 PDT 1998 >Last-Modified: Wed Oct 14 15:00:02 PDT 1998 >Originator: mnot@pobox.com >Organization: apache >Release: 1.3.3 >Environment: n/a >Description: This isn't a bug report; it's a feature request. Apologies if this isn't the best place to do it. I've looked through the docs for mod_log_config (as well as the source, briefly) and I don't see a way to make a log request conditional on anything but the status. What I'm thinking is that it would be nice to either expand the conditions to include whether or not another log variable is available (e.g., an environment variable), and fall back to something else if not. The reason I ask is that it would be nice to replace the host string when the environment variable X-FORWARDED-FOR is available, from proxy servers. That's pretty complex, and probably not too clean to implement. So, perhaps an extra log field type just for this might be in order to achieve this. Doing this would have some fairly far-reaching effects for people who used it, so I don't know how advisable it is; it just struck me as something that may be useful for some ppl running non-configurable web logfile analysers, to get better stats. Just a thought. Cheers >How-To-Repeat: >Fix: >Audit-Trail: From: Marc Slemko To: Mark Nottingham Cc: apbugs@hyperreal.org Subject: Re: mod_log-any/3205: request for conditional in mod_log_config Date: Wed, 14 Oct 1998 14:50:38 -0700 (PDT) On 14 Oct 1998, Mark Nottingham wrote: > This isn't a bug report; it's a feature request. Apologies if this isn't the > best place to do it. > > I've looked through the docs for mod_log_config (as well as the source, briefly) > and I don't see a way to make a log request conditional on anything but the > status. > > What I'm thinking is that it would be nice to either expand the conditions to > include whether or not another log variable is available (e.g., an environment > variable), and fall back to something else if not. > > The reason I ask is that it would be nice to replace the host string when > the environment variable X-FORWARDED-FOR is available, from proxy servers. I think it would be easier if you just logged to a pipe, then had the program you are logging to get a CustomLog with both the X-FORWARDED-FOR and the normal client, then use one or the other when it writes logs out depending. Or you could do this in a batch process after the fact. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]