Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-40

PatternLayout does not support Java date format specifiers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.7
    • 0.10.0
    • Layout
    • 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.

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            carnold@apache.org Curt Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: