You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Randy Terbush <ra...@covalent.net> on 1997/11/19 20:29:05 UTC
[PATCH] Logging the METHOD
I've made the following simple change to mod_log_config.c to allow
logging of the method. Can't seem to find another way to get to
this information. Am I missing something?
Index: mod_log_config.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_log_config.c,v
retrieving revision 1.41
diff -c -r1.41 mod_log_config.c
*** mod_log_config.c 1997/10/22 20:30:24 1.41
--- mod_log_config.c 1997/11/19 18:44:25
***************
*** 124,129 ****
--- 124,130 ----
* %...{Foobar}o: The contents of Foobar: header line(s) in the reply.
* %...p: the port the request was served to
* %...P: the process ID of the child that serviced the request.
+ * %...m: the method of the request
* %...r: first line of request
* %...s: status. For requests that got internally redirected, this
* is status of the *original* request --- %...>s for the last.
***************
*** 294,299 ****
--- 295,305 ----
return rvalue;
}
+ static char *log_method(request_rec *r, char *a)
+ {
+ return r->method;
+ }
+
static char *log_request_line(request_rec *r, char *a)
{
return r->the_request;
***************
*** 468,473 ****
--- 474,482 ----
},
{
'P', log_child_pid, 0
+ },
+ {
+ 'm', log_method, 0
},
{
'\0'
Re: [PATCH] Logging the METHOD
Posted by Brian Behlendorf <br...@organic.com>.
At 01:44 PM 11/19/97 -0800, Dean Gaudet wrote:
>Um, if we're going to add more %things to mod_log_config now then we
>should probably deal with the half-dozen or so PRs asking for other really
>reasonable things. Like, the one asking for the ability to log the
>numeric IP address; our current thing, logging the get_remote_host()
>result is next to useless if you're interested in any sort of security
>auditing (because it is sometimes a name, and it's easy to cause a name to
>go in there, even with double reverse, which is completely untraceable
>except at the moment the server logs it).
This is entirely consistant with my desire to leave logging outside the
server, so +1 in concept. I've seen a need to have the pid logged, and the
unix time.
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"it's a big world, with lots of records to play." - sig brian@organic.com
Re: [PATCH] Logging the METHOD
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Wed, Nov 19, 1997 at 01:29:05PM -0600, Randy Terbush wrote:
> I've made the following simple change to mod_log_config.c to allow
> logging of the method.
+1
Martin
--
| S I E M E N S | <Ma...@mch.sni.de> | Siemens Nixdorf
| ------------- | Voice: +49-89-636-46021 | Informationssysteme AG
| N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request
Re: [PATCH] Logging the METHOD
Posted by Dean Gaudet <dg...@arctic.org>.
Um, if we're going to add more %things to mod_log_config now then we
should probably deal with the half-dozen or so PRs asking for other really
reasonable things. Like, the one asking for the ability to log the
numeric IP address; our current thing, logging the get_remote_host()
result is next to useless if you're interested in any sort of security
auditing (because it is sometimes a name, and it's easy to cause a name to
go in there, even with double reverse, which is completely untraceable
except at the moment the server logs it).
+0
Dean
On Wed, 19 Nov 1997, Randy Terbush wrote:
> I've made the following simple change to mod_log_config.c to allow
> logging of the method. Can't seem to find another way to get to
> this information. Am I missing something?
>
> Index: mod_log_config.c
> ===================================================================
> RCS file: /export/home/cvs/apachen/src/modules/standard/mod_log_config.c,v
> retrieving revision 1.41
> diff -c -r1.41 mod_log_config.c
> *** mod_log_config.c 1997/10/22 20:30:24 1.41
> --- mod_log_config.c 1997/11/19 18:44:25
> ***************
> *** 124,129 ****
> --- 124,130 ----
> * %...{Foobar}o: The contents of Foobar: header line(s) in the reply.
> * %...p: the port the request was served to
> * %...P: the process ID of the child that serviced the request.
> + * %...m: the method of the request
> * %...r: first line of request
> * %...s: status. For requests that got internally redirected, this
> * is status of the *original* request --- %...>s for the last.
> ***************
> *** 294,299 ****
> --- 295,305 ----
> return rvalue;
> }
>
> + static char *log_method(request_rec *r, char *a)
> + {
> + return r->method;
> + }
> +
> static char *log_request_line(request_rec *r, char *a)
> {
> return r->the_request;
> ***************
> *** 468,473 ****
> --- 474,482 ----
> },
> {
> 'P', log_child_pid, 0
> + },
> + {
> + 'm', log_method, 0
> },
> {
> '\0'
>
>
>
>