logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1557603 - in /logging/log4j/log4j2/trunk: log4j-api/src/main/java/org/apache/logging/log4j/ log4j-api/src/main/java/org/apache/logging/log4j/simple/ log4j-api/src/main/java/org/apache/logging/log4j/spi/ log4j-api/src/test/java/org/apache/l...
Date Sun, 12 Jan 2014 19:44:55 GMT
Author: rgoers
Date: Sun Jan 12 19:44:54 2014
New Revision: 1557603

URL: http://svn.apache.org/r1557603
Log:
Configuration was being processed twice at startup.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContextFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
Sun Jan 12 19:44:54 2014
@@ -152,7 +152,7 @@ public class LogManager {
      * @return a LoggerContext.
      */
     public static LoggerContext getContext(final boolean currentContext) {
-        return factory.getContext(LogManager.class.getName(), null, null, currentContext,
null);
+        return factory.getContext(LogManager.class.getName(), null, null, currentContext,
null, null);
     }
 
     /**
@@ -201,7 +201,7 @@ public class LogManager {
      */
     public static LoggerContext getContext(final ClassLoader loader, final boolean currentContext,
                                            final URI configLocation) {
-        return factory.getContext(LogManager.class.getName(), loader, null, currentContext,
configLocation);
+        return factory.getContext(LogManager.class.getName(), loader, null, currentContext,
configLocation, null);
     }
 
 
@@ -219,7 +219,29 @@ public class LogManager {
      */
     public static LoggerContext getContext(final ClassLoader loader, final boolean currentContext,
                                            final Object externalContext, final URI configLocation)
{
-        return factory.getContext(LogManager.class.getName(), loader, externalContext, currentContext,
configLocation);
+        return factory.getContext(LogManager.class.getName(), loader, externalContext, currentContext,
configLocation,
+            null);
+    }
+
+
+    /**
+     * Returns a LoggerContext.
+     *
+     * @param loader The ClassLoader for the context. If null the context will attempt to
determine the appropriate
+     * ClassLoader.
+     * @param currentContext if false the LoggerContext appropriate for the caller of this
method is returned. For
+     * example, in a web application if the caller is a class in WEB-INF/lib then one LoggerContext
may be
+     * returned and if the caller is a class in the container's classpath then a different
LoggerContext may be
+     * returned. If true then only a single LoggerContext will be returned.
+     * @param configLocation The URI for the configuration to use.
+     * @param name The LoggerContext name.
+     * @return a LoggerContext.
+     */
+    public static LoggerContext getContext(final ClassLoader loader, final boolean currentContext,
+                                           final Object externalContext, final URI configLocation,
+                                           final String name) {
+        return factory.getContext(LogManager.class.getName(), loader, externalContext, currentContext,
configLocation,
+            name);
     }
 
     /**

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLoggerContextFactory.java
Sun Jan 12 19:44:54 2014
@@ -36,7 +36,7 @@ public class SimpleLoggerContextFactory 
 
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object
externalContext,
-                                    final boolean currentContext, final URI configLocation)
{
+                                    final boolean currentContext, final URI configLocation,
final String name) {
         return context;
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContextFactory.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContextFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerContextFactory.java
Sun Jan 12 19:44:54 2014
@@ -44,10 +44,11 @@ public interface LoggerContextFactory {
      * for the caller if a more appropriate Context can be determined.
      * @param configLocation The location of the configuration for the LoggerContext.
      * @param externalContext An external context (such as a ServletContext) to be associated
with the LoggerContext.
+     * @param name The name of the context or null.
      * @return The LoggerContext.
      */
     LoggerContext getContext(String fqcn, ClassLoader loader, Object externalContext, boolean
currentContext,
-                             URI configLocation);
+                             URI configLocation, String name);
 
     /**
      * Removes knowledge of a LoggerContext.

Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLoggerContextFactory.java
Sun Jan 12 19:44:54 2014
@@ -36,7 +36,7 @@ public class TestLoggerContextFactory im
 
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object
externalContext,
-                                    final boolean currentContext, final URI configLocation)
{
+                                    final boolean currentContext, final URI configLocation,
final String name) {
         return context;
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
Sun Jan 12 19:44:54 2014
@@ -22,6 +22,8 @@ import java.net.URISyntaxException;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.impl.ContextAnchor;
+import org.apache.logging.log4j.core.impl.Log4jContextFactory;
+import org.apache.logging.log4j.spi.LoggerContextFactory;
 import org.apache.logging.log4j.status.StatusLogger;
 
 /**
@@ -101,14 +103,9 @@ public final class Configurator {
 
         try {
             final org.apache.logging.log4j.spi.LoggerContext context = LogManager.getContext(loader,
false,
-                externalContext, configLocation);
+                externalContext, configLocation, name);
             if (context instanceof LoggerContext) {
-                final LoggerContext ctx = (LoggerContext) context;
-                ContextAnchor.THREAD_CONTEXT.set(ctx);
-                final Configuration config = ConfigurationFactory.getInstance().getConfiguration(name,
configLocation);
-                ctx.start(config);
-                ContextAnchor.THREAD_CONTEXT.remove();
-                return ctx;
+                return (LoggerContext) context;
             } else {
                 LOGGER.error("LogManager returned an instance of {} which does not implement
{}. Unable to initialize Log4j",
                     context.getClass().getName(), LoggerContext.class.getName());
@@ -150,18 +147,20 @@ public final class Configurator {
             } catch (final Exception ex) {
                 // Invalid source location.
             }
-            final org.apache.logging.log4j.spi.LoggerContext context = LogManager.getContext(loader,
false,
-                externalContext, configLocation);
-            if (context instanceof LoggerContext) {
-                final LoggerContext ctx = (LoggerContext) context;
-                ContextAnchor.THREAD_CONTEXT.set(ctx);
-                final Configuration config = ConfigurationFactory.getInstance().getConfiguration(source);
-                ctx.start(config);
-                ContextAnchor.THREAD_CONTEXT.remove();
-                return ctx;
+            final LoggerContextFactory f = LogManager.getFactory();
+            if (f instanceof Log4jContextFactory) {
+                Log4jContextFactory factory = (Log4jContextFactory) f;
+                final org.apache.logging.log4j.spi.LoggerContext context = factory.getContext(Configurator.class.getName(),
+                    loader, externalContext, false, source);
+                if (context instanceof LoggerContext) {
+                    return (LoggerContext) context;
+                } else {
+                    LOGGER.error("LogManager returned an instance of {} which does not implement
{}. Unable to initialize Log4j",
+                        context.getClass().getName(), LoggerContext.class.getName());
+                }
             } else {
-                LOGGER.error("LogManager returned an instance of {} which does not implement
{}. Unable to initialize Log4j",
-                    context.getClass().getName(), LoggerContext.class.getName());
+                LOGGER.error("LogManager is not using a Log4j Context Factory. Unable to
initialize Log4j");
+                return null;
             }
         } catch (final Exception ex) {
             ex.printStackTrace();

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/Log4jContextFactory.java
Sun Jan 12 19:44:54 2014
@@ -19,6 +19,8 @@ package org.apache.logging.log4j.core.im
 import java.net.URI;
 
 import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.core.helpers.Constants;
 import org.apache.logging.log4j.core.helpers.Loader;
 import org.apache.logging.log4j.core.selector.ClassLoaderContextSelector;
@@ -96,18 +98,55 @@ public class Log4jContextFactory impleme
      */
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object
externalContext,
-                                    final boolean currentContext, final URI configLocation)
{
+                                    final boolean currentContext, final URI configLocation,
final String name) {
         final LoggerContext ctx = selector.getContext(fqcn, loader, currentContext, configLocation);
         if (externalContext != null && ctx.getExternalContext() == null) {
             ctx.setExternalContext(externalContext);
         }
         if (ctx.getStatus() == LoggerContext.Status.INITIALIZED) {
-            ctx.start();
+            if (configLocation != null || name != null) {
+                ContextAnchor.THREAD_CONTEXT.set(ctx);
+                final Configuration config = ConfigurationFactory.getInstance().getConfiguration(name,
configLocation);
+                ctx.start(config);
+                ContextAnchor.THREAD_CONTEXT.remove();
+            } else {
+                ctx.start();
+            }
+        }
+        return ctx;
+    }
+
+    /**
+     * Load the LoggerContext using the ContextSelector.
+     * @param fqcn The fully qualified class name of the caller.
+     * @param loader The ClassLoader to use or null.
+     * @param externalContext An external context (such as a ServletContext) to be associated
with the LoggerContext.
+     * @param currentContext If true returns the current Context, if false returns the Context
appropriate
+     * for the caller if a more appropriate Context can be determined.
+     * @param source The configuration source.
+     * @return The LoggerContext.
+     */
+    public LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object
externalContext,
+                                    final boolean currentContext, final ConfigurationFactory.ConfigurationSource
source) {
+        final LoggerContext ctx = selector.getContext(fqcn, loader, currentContext, null);
+        if (externalContext != null && ctx.getExternalContext() == null) {
+            ctx.setExternalContext(externalContext);
+        }
+        if (ctx.getStatus() == LoggerContext.Status.INITIALIZED) {
+            if (source != null) {
+                ContextAnchor.THREAD_CONTEXT.set(ctx);
+                final Configuration config = ConfigurationFactory.getInstance().getConfiguration(source);
+                ctx.start(config);
+                ContextAnchor.THREAD_CONTEXT.remove();
+            } else {
+                ctx.start();
+            }
         }
         return ctx;
     }
 
 
+
     /**
      * Removes knowledge of a LoggerContext.
      *

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
Sun Jan 12 19:44:54 2014
@@ -45,6 +45,9 @@ public class TestConfigurator {
 
     private static final String FILESEP = System.getProperty("file.separator");
 
+
+    private LoggerContext ctx = null;
+
     private static final String[] CHARS = new String[] {
         "aaaaaaaaaa",
         "bbbbbbbbbb",
@@ -64,12 +67,16 @@ public class TestConfigurator {
     @After
     public void cleanup() {
         System.clearProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY);
+        if (ctx != null) {
+            Configurator.shutdown(ctx);
+            ctx = null;
+        }
     }
 
 
     @Test
     public void testFromFile() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-config.xml");
+        ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-config.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -88,7 +95,7 @@ public class TestConfigurator {
         final InputStream is = new FileInputStream("target/test-classes/log4j2-config.xml");
         final ConfigurationFactory.ConfigurationSource source =
             new ConfigurationFactory.ConfigurationSource(is, "target/test-classes/log4j2-config.xml");
-        final LoggerContext ctx = Configurator.initialize(null, source);
+        ctx = Configurator.initialize(null, source);
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -107,7 +114,7 @@ public class TestConfigurator {
         final InputStream is = new FileInputStream("target/test-classes/log4j2-config.xml");
         final ConfigurationFactory.ConfigurationSource source =
             new ConfigurationFactory.ConfigurationSource(is);
-        final LoggerContext ctx = Configurator.initialize(null, source);
+        ctx = Configurator.initialize(null, source);
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -123,7 +130,7 @@ public class TestConfigurator {
 
     @Test
     public void testFromClassPath() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "log4j2-config.xml");
+        ctx = Configurator.initialize("Test1", "log4j2-config.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -140,7 +147,7 @@ public class TestConfigurator {
     @Test
     public void testFromClassPathProperty() throws Exception {
         System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, "classpath:log4j2-config.xml");
-        final LoggerContext ctx = Configurator.initialize("Test1", null);
+        ctx = Configurator.initialize("Test1", null);
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -156,7 +163,7 @@ public class TestConfigurator {
 
     @Test
     public void testFromClassPathWithClassPathPrefix() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "classpath:log4j2-config.xml");
+        ctx = Configurator.initialize("Test1", "classpath:log4j2-config.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -172,7 +179,7 @@ public class TestConfigurator {
 
     @Test
     public void testFromClassPathWithClassLoaderPrefix() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "classloader:log4j2-config.xml");
+        ctx = Configurator.initialize("Test1", "classloader:log4j2-config.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -188,7 +195,7 @@ public class TestConfigurator {
 
     @Test
     public void testByName() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("-config", null);
+        ctx = Configurator.initialize("-config", null);
         LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -206,7 +213,7 @@ public class TestConfigurator {
     public void testReconfiguration() throws Exception {
         final File file = new File("target/test-classes/log4j2-config.xml");
         assertTrue("setLastModified should have succeeded.", file.setLastModified(System.currentTimeMillis()
- 120000));
-        final LoggerContext ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-config.xml");
+        ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-config.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -231,7 +238,7 @@ public class TestConfigurator {
 
     @Test
     public void testEnvironment() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("-config", null);
+        ctx = Configurator.initialize("-config", null);
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -257,7 +264,7 @@ public class TestConfigurator {
 
     @Test
     public void testNoLoggers() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-loggers.xml");
+        ctx = Configurator.initialize("Test1", "bad/log4j-loggers.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -266,7 +273,7 @@ public class TestConfigurator {
 
     @Test
     public void testBadStatus() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-status.xml");
+        ctx = Configurator.initialize("Test1", "bad/log4j-status.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -278,7 +285,7 @@ public class TestConfigurator {
 
     @Test
     public void testBadFilterParam() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-badfilterparam.xml");
+        ctx = Configurator.initialize("Test1", "bad/log4j-badfilterparam.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -291,7 +298,7 @@ public class TestConfigurator {
 
     @Test
     public void testNoFilters() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-nofilter.xml");
+        ctx = Configurator.initialize("Test1", "bad/log4j-nofilter.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -306,7 +313,7 @@ public class TestConfigurator {
 
     @Test
     public void testBadLayout() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-badlayout.xml");
+        ctx = Configurator.initialize("Test1", "bad/log4j-badlayout.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -323,7 +330,7 @@ public class TestConfigurator {
         }
         final String value = FILESEP.equals("/") ? dir.toString() + "/test.log" : "1:/target/bad:file.log";
         System.setProperty("testfile", value);
-        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-badfilename.xml");
+        ctx = Configurator.initialize("Test1", "bad/log4j-badfilename.xml");
         LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLoggerContextFactory.java
Sun Jan 12 19:44:54 2014
@@ -50,7 +50,7 @@ public class SLF4JLoggerContextFactory i
 
     @Override
     public LoggerContext getContext(final String fqcn, final ClassLoader loader, final Object
externalContext,
-                                    final boolean currentContext, final URI configLocation)
{
+                                    final boolean currentContext, final URI configLocation,
final String name) {
         return context;
     }
 

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1557603&r1=1557602&r2=1557603&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sun Jan 12 19:44:54 2014
@@ -21,6 +21,9 @@
   </properties>
   <body>
     <release version="2.0-RC1" date="2013-MM-DD" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-405" dev="rgoers" type="fix">
+        Configuration was being processed twice at startup.
+      </action>
       <action issue="LOG4J2-479" dev="rpopma" type="add" due-to="MK">
         ThreadContext now uses plain ThreadLocal by default, unless system property
         <tt>isThreadContextMapInheritable</tt> has value <tt>"true"</tt>.



Mime
View raw message