Log4cxx
  1. Log4cxx
  2. LOGCXX-40

PatternLayout does not support Java date format specifiers

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.7
    • Fix Version/s: 0.10.0
    • Component/s: Layout
    • Labels:
      None

      Description

      log4j's PatternLayout accepts a few special names (DATE, ISO8601, ABSOLUTE) and java.text.SimpleDateFormat patterns. log4cxx's PatternLayout supported the same special names and strftime patterns. This has been resolved by (in conjunction with other time related changes) by adding log4cxx::helpers::SimpleDateFormat and log4cxx::helpers::StrftimeDateFormat classes. If a date pattern is not recognized as a special name, then if it contains a % it is interpreted using StrftimeDateFormat, otherwise SimpleDateFormat.

      The implementation of StrftimeDateFormat uses Apache Portable Runtime's apr_strftime which does not appear to support the %Q specification for milliseconds.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Curt Arnold
            Reporter:
            Curt Arnold
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development