Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5344

Request log format string %D

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Documentation

    Description

      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

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

      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

      Attachments

        Activity

          People

            rombert Robert Munteanu
            damaan Jon Ekdahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: