You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1996/10/06 14:53:49 UTC

Re: src/mod_log_config.c enhancement


hi,

Thanks for the informatio and patch. I'll forward it to the developers
list for consideration.

regards,
rob


Kimmo Suominen wrote:
>
>Hello!
>
>I really didn't want to repeat the long LogFormat I use for each
>and every virtual site, so I added "%v" to the configurable log
>module.
>
>I now use this:
>
>LogFormat "[%v] %h %l %u %t \"%r\" %s %b \"%{User-Agent}i\" \"%{Referer}i\""
>
>My log processing scripts check for the bracketed extra info at
>the beginning and use it if it is there.  Otherwise they can just
>process the file like a normal CLF file.
>
>Cheers,
>+ Kim
>
>P.S.  The "%e" option was missing from the comments at the top.
>
>cvs diff: Diffing .
>Index: mod_log_config.c
>===================================================================
>RCS file: /src/repository/apache/src/mod_log_config.c,v
>retrieving revision 1.1.1.3
>diff -u -r1.1.1.3 mod_log_config.c
>--- mod_log_config.c	1996/07/07 17:37:41	1.1.1.3
>+++ mod_log_config.c	1996/10/06 00:26:43
>@@ -70,6 +70,8 @@
>  * %...{Foobar}i:  The contents of Foobar: header line(s) in the request
>  *                 sent to the client.
>  * %...{Foobar}o:  The contents of Foobar: header line(s) in the reply.
>+ * %...e:  environment variable.
>+ * %...v:  virtual host name.
>  *
>  * The '...' can be nothing at all (e.g. "%h %u %r %s %b"), or it can
>  * indicate conditions for inclusion of the item (which will cause it
>@@ -204,6 +206,9 @@
> char *log_env_var (request_rec *r, char *a)
> { return table_get (r->subprocess_env, a); }
> 
>+char *log_server_name (request_rec *r, char *a)
>+{ return r->server->server_hostname; }
>+
> char *log_request_time (request_rec *r, char *a)
> {
>     long timz;
>@@ -243,6 +248,7 @@
>     { 'i', log_header_in, 0 },
>     { 'o', log_header_out, 0 },
>     { 'e', log_env_var, 0 },
>+    { 'v', log_server_name, 0 },
>     { '\0' }
> };
> 
>


-- 
Rob Hartill (robh@imdb.com)    
http://www.imdb.com/  ... why wait for a clear night to see the stars?.