Tomas Micko created LOG4J2-3587:
-----------------------------------
Summary: 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
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
{noformat}
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){noformat}
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)