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

Rfc5424Layout fails if using constructor without mdcId or Enterprise number

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Layouts
    • Labels:
      None

      Description

      The Rfc5424Layout constructor contains a call to create a new StructuredDataId and, unlike the PluginFactory code, does not set the defaults of mdcId to DEFAULT_MDCID and enterpriseNumber to DEFAULT_ENTERPRISE_NUMBER. This causes StructuredDataId to raise an exception unless these two parameters are set, even if not used, which I think is an unexpected usage scenario.

      I can think of two options, set the defaults or possibly better yet don't try and create the object if includeMdc = false.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kwauchope Kelvin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: