Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-927

AccessPatternLayout documentation for %t states that ISO6801 is the default when it isn't

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.13
    • Fix Version/s: 1.1.0
    • Component/s: logback-access
    • Labels:
      None

      Description

      The documentation for AccessPatternLayout states:

      If no date format specifier is given then ISO8601 format is assumed.

      But in actuality, the code defaults to CLF_DATE_PATTERN (i.e., "dd/MM/yyyy:HH:mm:ss Z")

      (Note that the %date specifier for the normal logback-classic PatternLayout is defaulting to ISO8601).

      I'm not sure if the documentation is wrong or the code is. The documentation also indicates that %d can be used in the AccessPattern Layout, but I don't believe it can. However, neither option matches the Apache Common Log Format.

      My guess is that the documentation is wrong (copy/pasted from other PatternLayout) and that the CLF_DATE_PATTERN is wrong, as it should be "dd/MMM/yyyy:HH:mm:ss Z" (note, the extra M to display the 3-character month)

        Attachments

          Activity

            People

            • Assignee:
              tony19 Tony Trinh
              Reporter:
              ericdahl Eric Dahl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: