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

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

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.1.0
    • 1.0.13
    • logback-access
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: