]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add '%X' as an alias for '%c' in LogFormat. Both work and
authorJim Jagielski <jim@apache.org>
Thu, 4 Dec 2003 14:44:49 +0000 (14:44 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 4 Dec 2003 14:44:49 +0000 (14:44 +0000)
do the same thing, so we don't have backwards compatibility
problems, but now people can adjust to use '%X' to log
the connection status when using mod_ssl (which changes
what '%c' means)

PR:
Obtained from: Apache 2.x
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@101985 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/modules/standard/mod_log_config.c

index 7620e1089b416cc044a87220d8a1f6c85ef0ffc6..c10ca8c60b51fb76730f5d24fb23cb42ad35eff1 100644 (file)
@@ -1,5 +1,10 @@
 Changes with Apache 1.3.30
 
+  *) '%X' is now accepted as an alias for '%c' in the
+     LogFormat directive. This allows you to configure logging
+     to still log the connection status even with mod_ssl
+     (which changes what '%c' means). [Jim Jagielski]
+
   *) UseCanonicalName off was ignoring the client provided
      port information. [Jim Jagielski]
 
index d3d6c30bf652d81b8eaf49a251bae9ba1fc54740..dfb72337fec699d3d3237025e066fbe096121494 100644 (file)
  * literal characters copied into the log files, and '%' directives as
  * follows:
  *
- * %...B:  bytes sent, excluding HTTP headers.
+ * %...a:  remote IP-address
+ * %...A:  local IP-address
  * %...b:  bytes sent, excluding HTTP headers in CLF format, i.e. a '-'
  *         when no bytes where sent (rather than a '0'.
+ * %...B:  bytes sent, excluding HTTP headers.
  * %...c:  Status of the connection.
  *         'X' = connection aborted before the response completed.
  *         '+' = connection may be kept alive after the response is sent.
  * %...{FOOBAR}e:  The contents of the environment variable FOOBAR
  * %...f:  filename
  * %...h:  remote host
- * %...a:  remote IP-address
- * %...A:  local IP-address
+ * %...H:  the request protocol
  * %...{Foobar}i:  The contents of Foobar: header line(s) in the request
  *                 sent to the client.
  * %...l:  remote logname (from identd, if supplied)
+ * %...m:  the request method
  * %...{Foobar}n:  The contents of note "Foobar" from another module.
  * %...{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.
+ * %...q:  the query string prepended by "?", or empty if no query string
  * %...r:  first line of request
  * %...s:  status.  For requests that got internally redirected, this
  *         is status of the *original* request --- %...>s for the last.
  * %...U:  the URL path requested.
  * %...v:  the configured name of the server (i.e. which virtual host?)
  * %...V:  the server name according to the UseCanonicalName setting
- * %...m:  the request method
- * %...H:  the request protocol
- * %...q:  the query string prepended by "?", or empty if no query string
+ * %...X:  An alias for %..c (Status of the connection).
  *
  * 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
@@ -500,9 +501,6 @@ static struct log_item_list {
     int want_orig_default;
 } log_item_keys[] = {
 
-    {
-        'h', log_remote_host, 0
-    },
     {   
         'a', log_remote_address, 0 
     },
@@ -510,70 +508,76 @@ static struct log_item_list {
         'A', log_local_address, 0 
     },
     {
-        'l', log_remote_logname, 0
+        'b', clf_log_bytes_sent, 0
     },
     {
-        'u', log_remote_user, 0
+        'B', log_bytes_sent, 0
     },
     {
-        't', log_request_time, 0
+        'c', log_connection_status, 0
     },
     {
-        'T', log_request_duration, 1
+        'e', log_env_var, 0
     },
     {
-        'r', log_request_line, 1
+        'f', log_request_file, 0
     },
     {
-        'f', log_request_file, 0
+        'h', log_remote_host, 0
     },
     {
-        'U', log_request_uri, 1
+        'H', log_request_protocol, 0
     },
     {
-        's', log_status, 1
+        'i', log_header_in, 0
     },
     {
-        'b', clf_log_bytes_sent, 0
+        'l', log_remote_logname, 0
     },
     {
-        'B', log_bytes_sent, 0
+        'm', log_request_method, 0
     },
     {
-        'i', log_header_in, 0
+        'n', log_note, 0
     },
     {
         'o', log_header_out, 0
     },
     {
-        'n', log_note, 0
+        'p', log_server_port, 0
     },
     {
-        'e', log_env_var, 0
+        'P', log_child_pid, 0
     },
     {
-        'V', log_server_name, 0
+        'q', log_request_query, 0
     },
     {
-        'v', log_virtual_host, 0
+        'r', log_request_line, 1
     },
     {
-        'p', log_server_port, 0
+        's', log_status, 1
     },
     {
-        'P', log_child_pid, 0
+        't', log_request_time, 0
     },
     {
-        'H', log_request_protocol, 0
+        'T', log_request_duration, 1
     },
     {
-        'm', log_request_method, 0
+        'u', log_remote_user, 0
     },
     {
-        'q', log_request_query, 0
+        'U', log_request_uri, 1
     },
     {
-        'c', log_connection_status, 0
+        'v', log_virtual_host, 0
+    },
+    {
+        'V', log_server_name, 0
+    },
+    {
+        'X', log_connection_status, 0
     },
     {
         '\0'