Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-670

DatePatternConverter ISO8601_PATTERN does not conform to ISO8601

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-rc1
    • Fix Version/s: 2.0.1
    • Component/s: Pattern Converters
    • Labels:
      None

      Description

      ISO8601_PATTERN is defined with a space between the date and the time. ISO8601 requires a 'T' between the date and the time.

        Issue Links

          Activity

          Hide
          remkop@yahoo.com Remko Popma added a comment -

          I agree. I created a new issue, LOG4J2-749, for this.

          Show
          remkop@yahoo.com Remko Popma added a comment - I agree. I created a new issue, LOG4J2-749 , for this.
          Hide
          seh4nc Scott Harrington added a comment -

          If you agree with my 'DEFAULT' suggestion, apply and review the patch attached.

          It also fixes some of the tests that are failing due to the introduction of 'T' separator.

          Show
          seh4nc Scott Harrington added a comment - If you agree with my 'DEFAULT' suggestion, apply and review the patch attached. It also fixes some of the tests that are failing due to the introduction of 'T' separator.
          Hide
          seh4nc Scott Harrington added a comment -

          You're going to get complaints from more folks about changing this long-standing format, which happens to be the default if nothing is specified after the '%d'.

          What I mean is, a lot of people have been getting the space separator, and they are not explicitly asking for ISO8601, and now they're going to start getting a 'T' separator.

          Presence/absence of a space will affect anyone who slices up their log files using awk or cut with whitespace delimiters.

          I suggest you introduce a new pattern named 'DEFAULT' (and which gets used by default):

          %d{ISO8601} = yyyy-MM-dd'T'HH:mm:ss,SSS
          %d{ISO8601_BASIC} = yyyyMMdd'T'HHmmss,SSS
          %d = %d{DEFAULT} = yyyy-MM-dd HH:mm:ss,SSS
          
          Show
          seh4nc Scott Harrington added a comment - You're going to get complaints from more folks about changing this long-standing format, which happens to be the default if nothing is specified after the '%d'. What I mean is, a lot of people have been getting the space separator, and they are not explicitly asking for ISO8601, and now they're going to start getting a 'T' separator. Presence/absence of a space will affect anyone who slices up their log files using awk or cut with whitespace delimiters. I suggest you introduce a new pattern named 'DEFAULT' (and which gets used by default): %d{ISO8601} = yyyy-MM-dd'T'HH:mm:ss,SSS %d{ISO8601_BASIC} = yyyyMMdd'T'HHmmss,SSS %d = %d{DEFAULT} = yyyy-MM-dd HH:mm:ss,SSS
          Hide
          remkop@yahoo.com Remko Popma added a comment -

          Fixed in revision 1613644.
          Please verify and close.

          Show
          remkop@yahoo.com Remko Popma added a comment - Fixed in revision 1613644. Please verify and close.

            People

            • Assignee:
              remkop@yahoo.com Remko Popma
              Reporter:
              ralph.goers@dslextreme.com Ralph Goers
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development