summaryrefslogtreecommitdiffstats
path: root/modules/loggers
diff options
context:
space:
mode:
authorBill Stoddard <stoddard@apache.org>2000-11-03 04:08:31 +0100
committerBill Stoddard <stoddard@apache.org>2000-11-03 04:08:31 +0100
commit760b659c6686aeba29a6addb84487615b1999c78 (patch)
treeae127809e0f387c9fd366853603d6cb5d02a0b26 /modules/loggers
parentMerge forward mod_log_config enhancement. (diff)
downloadapache2-760b659c6686aeba29a6addb84487615b1999c78.tar.xz
apache2-760b659c6686aeba29a6addb84487615b1999c78.zip
Merge the 1.3 patch to add support for logging query string in
such a way that "%m %U%q %H" is the same as "%r". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86819 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers')
-rw-r--r--modules/loggers/mod_log_config.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index c48d545a86..dbadb25d75 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -149,7 +149,8 @@
* %...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
+ * %...H: the request protocol
+ * %...q: the query string prepended by "?", or empty if no query string
*
* 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
@@ -357,6 +358,11 @@ static const char *log_request_protocol(request_rec *r, char *a)
{
return r->protocol;
}
+static const char *log_request_query(request_rec *r, char *a)
+{
+ return (r->args != NULL) ? apr_pstrcat(r->pool, "?", r->args, NULL)
+ : "";
+}
static const char *log_status(request_rec *r, char *a)
{
return pfmt(r->pool, r->status);
@@ -585,6 +591,9 @@ static struct log_item_list {
'm', log_request_method, 0
},
{
+ 'q', log_request_query, 0
+ },
+ {
'c', log_connection_status, 0
},
{