[
https://issues.apache.org/jira/browse/LOG4J2-3587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601458#comment-17601458
]
ASF subversion and git services commented on LOG4J2-3587:
---------------------------------------------------------
Commit 1470d504b490ef2248c4a6efc9817b076e88e4a7 in logging-log4j2's branch
refs/heads/remove-slf4j-18 from Piotr P. Karwasz
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=1470d504b4 ]
[LOG4J2-3587] Add default enterprise ID value
Adds the correct default values on both the factory method and builder class
and a test case to prevent regressions.
> Cannot create Rfc5424Layout without enterpriseNumber after upgrading to 2.18.0
> ------------------------------------------------------------------------------
>
> Key: LOG4J2-3587
> URL: https://issues.apache.org/jira/browse/LOG4J2-3587
> Project: Log4j 2
> Issue Type: Bug
> Affects Versions: 2.18.0
> Reporter: Tomas Micko
> Assignee: Piotr Karwasz
> Priority: Minor
>
> Hello,
> I get an exception when using {{Rfc5424Layout}} after upgrading to 2.18.0
> (but it works in 2.17.2). Using this configuration:
> {code:java}
> <Configuration>
> <Appenders>
> <Console name="stdout" target="SYSTEM_OUT">
> <Rfc5424Layout />
> </Console>
> </Appenders>
> </Configuration> {code}
> I get this when starting my application:
> {code:java}
> java.lang.IllegalArgumentException: No enterprise number was supplied
> at
> org.apache.logging.log4j.message.StructuredDataId.<init>(StructuredDataId.java:169)
> at
> org.apache.logging.log4j.message.StructuredDataId.<init>(StructuredDataId.java:132)
> at
> org.apache.logging.log4j.core.layout.Rfc5424Layout.<init>(Rfc5424Layout.java:149)
> at
> org.apache.logging.log4j.core.layout.Rfc5424Layout.createLayout(Rfc5424Layout.java:643)
> {code}
> I need to specify an enterpriseNumber for Rfc5424Layout like this to make it
> work:
> {code:java}
> <Configuration>
> <Appenders>
> <Console name="stdout" target="SYSTEM_OUT">
> <Rfc5424Layout enterpriseNumber="123456" />
> </Console>
> </Appenders>
> </Configuration> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)