You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "Kelvin (JIRA)" <ji...@apache.org> on 2017/06/14 13:36:00 UTC

[jira] [Created] (LOG4J2-1940) Rfc5424Layout fails if using constructor without mdcId or Enterprise number

Kelvin created LOG4J2-1940:
------------------------------

             Summary: Rfc5424Layout fails if using constructor without mdcId or Enterprise number
                 Key: LOG4J2-1940
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1940
             Project: Log4j 2
          Issue Type: Bug
          Components: Layouts
            Reporter: Kelvin
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)