You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Vijay Shanker <ov...@usa.net> on 2001/03/05 19:05:00 UTC
documentation/7359: 2.0a9 does not support the option %D in LogFormats to log the time taken per request in microseconds.
>Number: 7359
>Category: documentation
>Synopsis: 2.0a9 does not support the option %D in LogFormats to log the time taken per request in microseconds.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: doc-bug
>Submitter-Id: apache
>Arrival-Date: Mon Mar 05 10:10:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: ovijay@usa.net
>Release: 2.0a9
>Organization:
apache
>Environment:
SunOS subzero 5.6 Generic_105181-19 sun4u sparc SUNW,Ultra-5_10
>Description:
Following are the lines from my httpd.conf-
LogFormat "%h %l %u %t \"%r\" %>s %b %D" common
CustomLog /opt/ipac/apache_httpd/logs/access_log common
When I restart Apache I get the error message "Unrecognized LogFormat directive %D".
But the documentation says -
%...D: The time taken to serve the request, in microseconds.
My actual problem is to log the time taken by a request in micro seconds.
I have gone thru the code and in the file mod_log_config.c, "D" is not considered to be a valid argument altogether.
>How-To-Repeat:
Include "%D" in the logformat as below -
LogFormat "%h %l %u %t \"%r\" %>s %b %D" common
CustomLog /opt/ipac/apache_httpd/logs/access_log common
and restart apache.
>Fix:
One more entry for 'D' can be added to the structure "log_item_list" with the corresponding function "log_request_duration_inms".
Add a function "log_request_duration_inms" returning just (do not divide with APR_USEC_PER_SEC)
-return apr_psprintf(r->pool, "%ld", (apr_now() - r->request_time)
);
>Release-Note:
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]