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

LoggerMessageSupplierTest and LoggerSupplierTest are Locale sensitive

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.6
    • 2.6
    • API
    • None
    • French Windows 10, Java 8

    Description

      The following tests in API are failing on a French Windows 10:
      LoggerMessageSupplierTest.flowTracing_MessageSupplierOfMessageFormatMessage:103 Missing entry data
      Expected: a string containing "int foo=1,234,567,890"
      but: was "ENTRY[ FLOW ] TRACE entry int foo=1 234 567 890"
      LoggerMessageSupplierTest.flowTracing_MessageSupplierOfStringFormattedMessage:173 Missing entry data
      Expected: a string containing "int foo=1,234,567,890"
      but: was "ENTRY[ FLOW ] TRACE entry int foo=1 234 567 890"
      LoggerSupplierTest.flowTracing_SupplierOfMessageFormatMessage:116 Missing entry data
      Expected: a string containing "(int foo=1,234,567,890)"
      but: was "ENTRY[ FLOW ] TRACE entry params(int foo=1 234 567 890)"
      LoggerSupplierTest.flowTracing_SupplierOfStringFormattedMessage:200 Missing entry data
      Expected: a string containing "(int foo=1,234,567,890)"
      but: was "ENTRY[ FLOW ] TRACE entry params(int foo=1 234 567 890)"

      MessageFormatMessage uses MessageFormat,format(pattern, args), StringFormattedMessage uses String.format(pattern, args) both are using the default Locale to format the numbers.

      Attachments

        1. patch-log4j2-1276.diff
          3 kB
          Ludovic HOCHET
        2. patch-log4j2-1276-2.diff
          4 kB
          Ludovic HOCHET

        Activity

          People

            ggregory Gary D. Gregory
            lhochet Ludovic HOCHET
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: