>Number: 1885
>Category: mod_log-any
>Synopsis: Implementation to add a new option to mod_log_config: client
>IP address
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: support
>Submitter-Id: apache
>Arrival-Date: Fri Feb 27 14:20:02 PST 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.2.5
>Environment:
Any.
>Description:
Add the `a' option to LogFormat to log the client IP address.
Patch included.
>How-To-Repeat:
>Fix:
--- mod_log_config.c.orig Mon Feb 9 19:01:12 1998
+++ mod_log_config.c Mon Feb 9 22:00:44 1998
@@ -113,6 +113,7 @@
* %...{FOOBAR}e: The contents of the environment variable FOOBAR
* %...f: filename
* %...h: remote host
+ * %...a: remote ip
* %...{Foobar}i: The contents of Foobar: header line(s) in the request
* sent to the client.
* %...l: remote logname (from identd, if supplied)
@@ -240,6 +241,9 @@
char *log_remote_host (request_rec *r, char *a)
{ return (char *)get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME)
; }
+char *log_remote_address (request_rec *r, char *a)
+{ return r->connection->remote_ip; }
+
char *log_remote_logname(request_rec *r, char *a)
{return (char *)get_remote_logname(r);}
@@ -351,6 +355,7 @@
int want_orig_default;
} log_item_keys[] = {
{ 'h', log_remote_host, 0 },
+ { 'a', log_remote_address, 0 },
{ 'l', log_remote_logname, 0 },
{ 'u', log_remote_user, 0 },
{ 't', log_request_time, 0 },
%0
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]