[
https://issues.apache.org/jira/browse/LOG4J2-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory updated LOG4J2-1500:
---------------------------------
Description:
When you pass two configurations and there are different Nodes in the Root
logger a NPE gets thrown.
Example stub configuration 1
{code:xml}
<Loggers>
<Root level="...">
<AppenderRef ref="STDOUT">
<Property name="hostname">server1</Property>
</Root>
</Loggers>
{code}
Example stub configuration 2
{code:xml}
<Loggers>
<Root level="...">
<AppenderRef ref="STDOUT">
<AppenderRef ref="File">
</Root>
</Loggers>
{code}
Failure happens because DefaultMergeStrategy.isSameName() and isSameReference()
calls get() without checking for null.
was:
When you pass two configurations and there are different Nodes in the Root
logger a NPE gets thrown.
Example stub configuration 1
<Loggers>
<Root level="...">
<AppenderRef ref="STDOUT">
<Property name="hostname">server1</Property>
</Root>
</Loggers>
Example stub configuration 2
<Loggers>
<Root level="...">
<AppenderRef ref="STDOUT">
<AppenderRef ref="File">
</Root>
</Loggers>
Failure happens because DefaultMergeStrategy.isSameName() and isSameReference()
calls get() without checking for null.
> Merging configurations fail when comparing Nodes with different attributes
> --------------------------------------------------------------------------
>
> Key: LOG4J2-1500
> URL: https://issues.apache.org/jira/browse/LOG4J2-1500
> Project: Log4j 2
> Issue Type: Bug
> Components: Configurators
> Affects Versions: 2.6.2
> Reporter: Jose Leon
>
> When you pass two configurations and there are different Nodes in the Root
> logger a NPE gets thrown.
> Example stub configuration 1
> {code:xml}
> <Loggers>
> <Root level="...">
> <AppenderRef ref="STDOUT">
> <Property name="hostname">server1</Property>
> </Root>
> </Loggers>
> {code}
> Example stub configuration 2
> {code:xml}
> <Loggers>
> <Root level="...">
> <AppenderRef ref="STDOUT">
> <AppenderRef ref="File">
> </Root>
> </Loggers>
> {code}
> Failure happens because DefaultMergeStrategy.isSameName() and
> isSameReference() calls get() without checking for null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]