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

StructuredDataMessage is incorrectly validating value length instead of key length

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta2
    • 2.0-beta4
    • API
    • None

    Description

      During execution of method SLF4JLogger.log, the following exception is thrown during creation of the StructuredMessage with a key longer than 32 characters.

      java.lang.IllegalArgumentException: Structured data values are limited to 32 characters. key: memo value: This is a very long test memo to demonstrate the issue

      The validation should be on key length and not the value length.

      Attachments

        1. StructuredDataMessage.java.patch
          0.8 kB
          Arkin Yetis
        2. StructuredDataMessageTest.java.patch
          1 kB
          Arkin Yetis

        Activity

          People

            rgoers Ralph Goers
            arkin Arkin Yetis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: