[
https://issues.apache.org/jira/browse/LOG4J2-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15410073#comment-15410073
]
ASF GitHub Bot commented on LOG4J2-1500:
----------------------------------------
GitHub user leonj1 opened a pull request:
https://github.com/apache/logging-log4j2/pull/37
LOG4J2-1500 BUGFIX - Adding null check when attempting to get an attributes
View the referenced JIRA ticket with details on the problem. when dealing
with multiple log4j2 configuration files.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/leonj1/logging-log4j2
LOG4j2-1500-merging-configs-fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/logging-log4j2/pull/37.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #37
----
----
> 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]