PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_log_config: Add new format flag for requestion duration in milliseconds
- trunk patch: http://svn.apache.org/r1675533
- 2.4.x patch: trunk works (modulo CHANGES)
- +1: breser, druggeri, jim
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
* %...{format}t: The time, in the form given by format, which should
* be in strftime(3) format.
* %...T: the time taken to serve the request, in seconds.
+ * %...M: the time taken to serve the request, in milliseconds
* %...D: the time taken to serve the request, in micro seconds.
* %...u: remote user (from auth; may be bogus if return status (%s) is 401)
* %...U: the URL path requested.
return apr_psprintf(r->pool, "%" APR_TIME_T_FMT, apr_time_sec(duration));
}
+static const char *log_request_duration_milliseconds(request_rec *r, char *a)
+{
+ apr_time_t duration = get_request_end_time(r) - r->request_time;
+ return apr_psprintf(r->pool, "%" APR_TIME_T_FMT, apr_time_as_msec(duration));
+}
+
+
static const char *log_request_duration_microseconds(request_rec *r, char *a)
{
return apr_psprintf(r->pool, "%" APR_TIME_T_FMT,
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, "M", log_request_duration_milliseconds, 1);
log_pfn_register(p, "T", log_request_duration, 1);
log_pfn_register(p, "U", log_request_uri, 1);
log_pfn_register(p, "s", log_status, 1);