From 8adcd5a5ac2018759e439c1fb911a0170cdcf169 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 8 Sep 2008 14:52:21 +0000 Subject: [PATCH] Add in useful feature. %k which logs the keepalives value. PR: 45762 Dan Poirier git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@693120 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 4 ++++ docs/manual/mod/mod_log_config.xml | 5 +++++ modules/loggers/mod_log_config.c | 7 +++++++ 3 files changed, 16 insertions(+) diff --git a/CHANGES b/CHANGES index ed02d2bdab..7b73618800 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,10 @@ Changes with Apache 2.3.0 [ When backported to 2.2.x, remove entry from this file ] + *) Add new LogFormat parameter, %k, which logs the number of + keepalive requests on this connection for this request.. + [Dan Poirier ] + *) Be tolerant in what you accept - accept slightly broken status lines from a backend provide they include a valid status code. PR 44995 [Rainer Jung diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index 27c855c240..161314071b 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -107,6 +107,11 @@ The contents of Foobar: header line(s) in the request sent to the server. + %k + Number of requests handled on this connection. Interesting if + KeepAlive is being used; + otherwise this is always 0. + %l Remote logname (from identd, if supplied). This will return a dash unless mod_ident is present and pool, r->connection->keepalives); +} + /***************************************************************** * * Parsing the log format string @@ -1498,6 +1504,7 @@ static int log_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp) log_pfn_register(p, "q", log_request_query, 0); log_pfn_register(p, "X", log_connection_status, 0); log_pfn_register(p, "C", log_cookie, 0); + log_pfn_register(p, "k", log_requests_on_connection, 0); log_pfn_register(p, "r", log_request_line, 1); log_pfn_register(p, "D", log_request_duration_microseconds, 1); log_pfn_register(p, "T", log_request_duration, 1); -- 2.40.0