--- ./modules/loggers/mod_log_config.c.dist 2010-05-05 07:24:35.000000000 +0100 +++ ./modules/loggers/mod_log_config.c 2010-05-05 07:27:44.000000000 +0100 @@ -105,6 +105,7 @@ * be in strftime(3) format. * %...T: the time taken to serve the request, in seconds. * %...D: the time taken to serve the request, in micro seconds. + * %...M: the time in microseconds * %...u: remote user (from auth; may be bogus if return status (%s) is 401) * %...U: the URL path requested. * %...v: the configured name of the server (i.e. which virtual host?) @@ -626,6 +627,12 @@ (apr_time_now() - r->request_time)); } +static const char *log_request_microseconds(request_rec *r, char *a) +{ + return apr_psprintf(r->pool, "%" APR_TIME_T_FMT, + apr_time_now()); +} + /* These next two routines use the canonical name:port so that log * parsers don't need to duplicate all the vhost parsing crud. */ @@ -1513,6 +1520,7 @@ 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_microseconds, 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);