logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1522754 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
Date Fri, 13 Sep 2013 01:01:11 GMT
Author: rgoers
Date: Fri Sep 13 01:01:10 2013
New Revision: 1522754

URL: http://svn.apache.org/r1522754
Log:
LOG4J2-293 - Only WARN when a configuration already exists and a different one is provided

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java?rev=1522754&r1=1522753&r2=1522754&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/selector/ClassLoaderContextSelector.java
Fri Sep 13 01:01:10 2013
@@ -228,7 +228,8 @@ public class ClassLoaderContextSelector 
             if (ctx.getConfigLocation() == null && configLocation != null) {
                 LOGGER.debug("Setting configuration to {}", configLocation);
                 ctx.setConfigLocation(configLocation);
-            } else if (ctx.getConfigLocation() != null && !ctx.getConfigLocation().equals(configLocation))
{
+            } else if (ctx.getConfigLocation() != null && configLocation != null
&&
+                !ctx.getConfigLocation().equals(configLocation)) {
                 LOGGER.warn("locateContext called with URI {}. Existing LoggerContext has
URI {}", configLocation,
                     ctx.getConfigLocation());
             }



Mime
View raw message