You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Jon Ekdahl (JIRA)" <ji...@apache.org> on 2015/12/01 13:20:10 UTC

[jira] [Created] (SLING-5344) Request log format string %D

Jon Ekdahl created SLING-5344:
---------------------------------

             Summary: Request log format string %D
                 Key: SLING-5344
                 URL: https://issues.apache.org/jira/browse/SLING-5344
             Project: Sling
          Issue Type: Bug
          Components: Documentation
            Reporter: Jon Ekdahl
            Priority: Minor


I came across what I believe to be a defect in the log format description \[1]. The %D format string is described as _"The time taken to serve the request, in microseconds"_. However, the default request exit format is

{code}
%\{end}t \[%R] <\- %s %\{Content-Type}o %Dms
{code}

indicating that %D actually produces _milliseconds_, not microseconds. I also found the RequestLoggerResponse class \[2] in the Sling code base, where it looks like request duration is recorded and reported in milliseconds.

So is this simply a documentation bug, then? Maybe, maybe not. The Sling documentation \[1] also states the Sling follows the Apache httpd log format description \[3], where %D means duration in microseconds.

Either the documentation should be updated to reflect the fact that %D produces milliseconds or the implementation should be updated to produce microseconds.

\[1]: http://sling.apache.org/documentation/development/client-request-logging.html#log-format-specification
\[2]: https://github.com/apache/sling/blob/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLoggerResponse.java
\[3]: http://httpd.apache.org/docs/current/mod/mod_log_config.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)