Repository: logging-log4j2
Updated Branches:
  refs/heads/master 873166368 -> 5b4f3db4f


[LOG4J2-1912] CompositeConfiguration logs warning "Unable to determine
URI for configuration." However, the reconfiguration is completed.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/5b4f3db4
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/5b4f3db4
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/5b4f3db4

Branch: refs/heads/master
Commit: 5b4f3db4f5e7b24862c147b790806bca0b2d1892
Parents: 8731663
Author: Gary Gregory <[email protected]>
Authored: Thu Jul 6 02:03:07 2017 -0700
Committer: Gary Gregory <[email protected]>
Committed: Thu Jul 6 02:03:07 2017 -0700

----------------------------------------------------------------------
 .../log4j/core/config/composite/CompositeConfiguration.java       | 2 +-
 src/changes/changes.xml                                           | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5b4f3db4/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
index e38c62b..3fe20e9 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/composite/CompositeConfiguration.java
@@ -151,7 +151,7 @@ public class CompositeConfiguration extends 
AbstractConfiguration implements Rec
             final ConfigurationSource source = config.getConfigurationSource();
             final URI sourceURI = source.getURI();
             Configuration currentConfig;
-            if (sourceURI != null) {
+            if (sourceURI == null) {
                 LOGGER.warn("Unable to determine URI for configuration {}, 
changes to it will be ignored",
                         config.getName());
                 currentConfig = factory.getConfiguration(getLoggerContext(), 
config.getName(), sourceURI);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/5b4f3db4/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 6776fff..3996be8 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -85,6 +85,9 @@
       <action issue="LOG4J2-1874" dev="rpopma" type="add" due-to="Roman 
Leventov">
         Added methods ::writeBytes(ByteBuffer) and ::writeBytes(byte[], int, 
int) to ByteBufferDestination interface and use these methods in 
TextEncoderHelper where possible to prepare for future enhancements to reduce 
lock contention.
       </action>
+      <action issue="LOG4J2-1912" dev="ggregory" type="fix" due-to="R Ri">
+        CompositeConfiguration logs warning "Unable to determine URI for 
configuration." However, the reconfiguration is completed.
+      </action>
       <action issue="LOG4J2-1964" dev="ggregory" type="fix" due-to="Pierrick 
HYMBERT">
         Dynamic reconfiguration does not work for filePattern of RollingFile.
       </action>

Reply via email to