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

Rfc5424Layout fails if using constructor without mdcId or Enterprise number

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Layouts
    • 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

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

            Dates

              Created:
              Updated: