Bug 49251 - Add %M microsecond time format (complements strftime(), not the same as %D)
Summary: Add %M microsecond time format (complements strftime(), not the same as %D)
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_log_config (show other bugs)
Version: 2.2.15
Hardware: PC FreeBSD
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2010-05-05 08:26 UTC by George Michaelson
Modified: 2012-02-26 17:03 UTC (History)
0 users



Attachments
diff -bu modules/loggers/mod_log_config.{c.old, c} (1.39 KB, text/plain)
2010-05-05 08:26 UTC, George Michaelson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description George Michaelson 2010-05-05 08:26:14 UTC
Created attachment 25400 [details]
diff -bu modules/loggers/mod_log_config.{c.old, c}

%D uses the microtime call family to provide microsecond granularity runtime by using the apr current time and the start time.

But, there is no direct printout of the time in microseconds from the uint64 OS provided source. 

While I appreciate that microsecond time granularity is highly conditional and cannot be relied on, this is a useful diagnostic print field, and is applicable for a certain class of use of apache logs to compare behaviours in the same system over time.

This complements %D. combined with %D, this time can be used to derive the microsecond time period for arrival of the request, as well as completion.

strftime() does not provide a field for this directly. %s is it.

So, this is distinct from %t and %{format} and %D.

its based on the code for %D, its the minimum change which worked. I took the %M letter since a) its not in use and b) it made sense as M(icrotime)

Tested on FreeBSD. 'it works' (tm)
Comment 1 Stefan Fritsch 2011-06-15 23:11:27 UTC
implemented differently in trunk in r979120
Comment 2 Stefan Fritsch 2012-02-26 17:03:34 UTC
fixed in 2.4.1