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 1997/01/30 23:35:33 UTC
Not really a bug - a patch (fwd)
Something for 2.0 and/or the patches dir.
Let's keep new features out of 1.2 even though this one looks trivial
and harmless.
---------- Forwarded message ----------
Date: Thu, 30 Jan 1997 14:50:14 -0600 (CST)
From: Chris Adams <ca...@ro.com>
To: apache-bugs@apache.org
Subject: Not really a bug - a patch
I am trying to have a few virtual domains, but for now, I want all the
information to go to a single log file. That makes stats gathering
rather messed up with the program I am currently using (it only looks at
the URL, so the root page on all virtual hosts shows up the same to it).
What I did was to add a couple of options to the mod_log_config.c that
allow me to log a virtual domain like
LogFormat "%h %l %u %t \"%m /virtualroot%U %c\" %s %b"
where %m is the method and %c is the protocol (%p and %P were already
used). "/virtualroot" is where the page really is, so I can distinguish
between different virtual domain pages.
Anyway, here is the patch:
--- mod_log_config.c.orig Thu Jan 30 14:40:24 1997
+++ mod_log_config.c Thu Jan 30 14:29:44 1997
@@ -339,6 +339,13 @@
ap_snprintf(pidnum, sizeof(pidnum), "%ld", (long)getpid());
return pstrdup(r->pool, pidnum);
}
+
+char *log_method (request_rec *r, char *a)
+{ return r->method; }
+
+char *log_protocol (request_rec *r, char *a)
+{ return r->protocol; }
+
/*****************************************************************
*
* Parsing the log format string
@@ -366,6 +373,8 @@
{ 'v', log_virtual_host, 0 },
{ 'p', log_server_port, 0 },
{ 'P', log_child_pid, 0 },
+ { 'm', log_method, 0 },
+ { 'c', log_protocol, 0 },
{ '\0' }
};
--
Chris Adams - cadams@ro.com
System Administrator - Renaissance Internet Services
I don't speak for anybody but myself - that's enough trouble.