logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1504340 - in /logging/log4j/log4j2/trunk: core/src/main/java/org/apache/logging/log4j/core/config/ core/src/test/java/org/apache/logging/log4j/ core/src/test/java/org/apache/logging/log4j/core/appender/ core/src/test/java/org/apache/loggin...
Date Thu, 18 Jul 2013 01:47:30 GMT
Author: ggregory
Date: Thu Jul 18 01:47:29 2013
New Revision: 1504340

URL: http://svn.apache.org/r1504340
Log:
Refactor common API pattern for org.apache.logging.log4j.core.config.Configurator.initialize(String,
ClassLoader, String) (calling with a null class loader) into a new API: org.apache.logging.log4j.core.config.Configurator.initialize(String,
String).

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiMessagesMain.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleLayoutMain.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleNameLayoutMain.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutDefaultMain.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutLogbackMain.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutMain.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/MapFilterTest.java
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/StructuredDataFilterTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/Configurator.java
Thu Jul 18 01:47:29 2013
@@ -54,6 +54,16 @@ public final class Configurator {
     /**
      * Initializes the Logging Context.
      * @param name The Context name.
+     * @param configLocation The configuration for the logging context.
+     * @return The LoggerContext.
+     */
+    public static LoggerContext initialize(final String name, final String configLocation)
{
+        return initialize(name, null, configLocation);
+    }
+
+    /**
+     * Initializes the Logging Context.
+     * @param name The Context name.
      * @param loader The ClassLoader for the Context (or null).
      * @param configLocation The configuration for the logging context.
      * @return The LoggerContext.

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/FormatterLoggerManualExample.java
Thu Jul 18 01:47:29 2013
@@ -40,7 +40,7 @@ public class FormatterLoggerManualExampl
      * @param args
      */
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(FormatterLoggerManualExample.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(FormatterLoggerManualExample.class.getName(),
                 "target/test-classes/log4j2-console.xml");
         try {
             final User user = new User();

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiMessagesMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiMessagesMain.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiMessagesMain.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiMessagesMain.java
Thu Jul 18 01:47:29 2013
@@ -32,7 +32,7 @@ public class ConsoleAppenderAnsiMessages
     private static final Logger LOG = LogManager.getLogger(ConsoleAppenderAnsiMessagesMain.class);
 
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
                 "target/test-classes/log4j2-console.xml");
         try {
             LOG.fatal("\u001b[1;35mFatal message.\u001b[0m");

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleLayoutMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleLayoutMain.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleLayoutMain.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleLayoutMain.java
Thu Jul 18 01:47:29 2013
@@ -32,7 +32,7 @@ public class ConsoleAppenderAnsiStyleLay
     private static final Logger LOG = LogManager.getLogger(ConsoleAppenderAnsiStyleLayoutMain.class);
 
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
                 "target/test-classes/log4j2-console-style-ansi.xml");
         try {
             LOG.fatal("Fatal message.");

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleNameLayoutMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleNameLayoutMain.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleNameLayoutMain.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderAnsiStyleNameLayoutMain.java
Thu Jul 18 01:47:29 2013
@@ -32,7 +32,7 @@ public class ConsoleAppenderAnsiStyleNam
     private static final Logger LOG = LogManager.getLogger(ConsoleAppenderAnsiStyleNameLayoutMain.class);
 
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
                 "target/test-classes/log4j2-console-style-name-ansi.xml");
         try {
             LOG.fatal("Fatal message.");

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutDefaultMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutDefaultMain.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutDefaultMain.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutDefaultMain.java
Thu Jul 18 01:47:29 2013
@@ -32,7 +32,7 @@ public class ConsoleAppenderHighlightLay
     private static final Logger LOG = LogManager.getLogger(ConsoleAppenderHighlightLayoutDefaultMain.class);
 
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
                 "target/test-classes/log4j2-console-highlight-default.xml");
         try {
             LOG.fatal("Fatal message.");

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutLogbackMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutLogbackMain.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutLogbackMain.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutLogbackMain.java
Thu Jul 18 01:47:29 2013
@@ -32,7 +32,7 @@ public class ConsoleAppenderHighlightLay
     private static final Logger LOG = LogManager.getLogger(ConsoleAppenderHighlightLayoutLogbackMain.class);
 
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
                 "target/test-classes/log4j2-console-highlight-logback.xml");
         try {
             LOG.fatal("Fatal message.");

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutMain.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutMain.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutMain.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderHighlightLayoutMain.java
Thu Jul 18 01:47:29 2013
@@ -32,7 +32,7 @@ public class ConsoleAppenderHighlightLay
     private static final Logger LOG = LogManager.getLogger(ConsoleAppenderHighlightLayoutMain.class);
 
     public static void main(final String[] args) {
-        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
null,
+        final LoggerContext ctx = Configurator.initialize(ConsoleAppenderAnsiMessagesMain.class.getName(),
                 "target/test-classes/log4j2-console-highlight.xml");
         try {
             LOG.fatal("Fatal message.");

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/BaseConfigurationTest.java
Thu Jul 18 01:47:29 2013
@@ -34,7 +34,7 @@ public class BaseConfigurationTest {
     @Test
     public void testMissingRootLogger() throws Exception {
         PluginManager.addPackage("org.apache.logging.log4j.test.appender");
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "missingRootLogger.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "missingRootLogger.xml");
         final Logger logger = LogManager.getLogger("sample.Logger1");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("Config not null", config);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfigurator.java
Thu Jul 18 01:47:29 2013
@@ -68,7 +68,7 @@ public class TestConfigurator {
 
     @Test
     public void testFromFile() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "target/test-classes/log4j2-config.xml");
+        final LoggerContext 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);
@@ -125,7 +125,7 @@ public class TestConfigurator {
 
     @Test
     public void testFromClassPath() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "log4j2-config.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "log4j2-config.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -142,7 +142,7 @@ public class TestConfigurator {
 
     @Test
     public void testByName() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("-config", null, (String) null);
+        final LoggerContext ctx = Configurator.initialize("-config", (String) null);
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -161,7 +161,7 @@ public class TestConfigurator {
     public void testReconfiguration() throws Exception {
         final File file = new File("target/test-classes/log4j2-config.xml");
         file.setLastModified(System.currentTimeMillis() - 120000);
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "target/test-classes/log4j2-config.xml");
+        final LoggerContext 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);
@@ -187,7 +187,7 @@ public class TestConfigurator {
 
     @Test
     public void testEnvironment() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("-config", null, (String) null);
+        final LoggerContext ctx = Configurator.initialize("-config", (String) null);
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -213,7 +213,7 @@ public class TestConfigurator {
 
     @Test
     public void testNoLoggers() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "bad/log4j-loggers.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-loggers.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -222,7 +222,7 @@ public class TestConfigurator {
 
     @Test
     public void testBadStatus() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "bad/log4j-status.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-status.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -234,7 +234,7 @@ public class TestConfigurator {
 
     @Test
     public void testBadFilterParam() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "bad/log4j-badfilterparam.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-badfilterparam.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -247,7 +247,7 @@ public class TestConfigurator {
 
     @Test
     public void testNoFilters() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "bad/log4j-nofilter.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-nofilter.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -262,7 +262,7 @@ public class TestConfigurator {
 
     @Test
     public void testBadLayout() throws Exception {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "bad/log4j-badlayout.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-badlayout.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);
@@ -279,7 +279,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", null, "bad/log4j-badfilename.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "bad/log4j-badfilename.xml");
         final Logger logger = LogManager.getLogger("org.apache.test.TestConfigurator");
         final Configuration config = ctx.getConfiguration();
         assertNotNull("No configuration", config);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/config/TestConfiguratorError.java
Thu Jul 18 01:47:29 2013
@@ -36,7 +36,13 @@ public class TestConfiguratorError {
     }
 
     @Test
-    public void testError() throws Exception {
+    public void testErrorNoClassLoader() throws Exception {
+        final LoggerContext ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-config.xml");
+        assertNull("No LoggerContext should have been returned", ctx);
+    }
+
+    @Test
+    public void testErrorNullClassLoader() throws Exception {
         final LoggerContext ctx = Configurator.initialize("Test1", null, "target/test-classes/log4j2-config.xml");
         assertNull("No LoggerContext should have been returned", ctx);
     }

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilterTest.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilterTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilterTest.java
Thu Jul 18 01:47:29 2013
@@ -72,7 +72,7 @@ public class DynamicThresholdFilterTest 
 
     @Test
     public void testConfig() {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "target/test-classes/log4j2-dynamicfilter.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-dynamicfilter.xml");
         final Configuration config = ctx.getConfiguration();
         final Filter filter = config.getFilter();
         assertNotNull("No DynamicThresholdFilter", filter);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/MapFilterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/MapFilterTest.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/MapFilterTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/MapFilterTest.java
Thu Jul 18 01:47:29 2013
@@ -79,7 +79,7 @@ public class MapFilterTest {
 
     @Test
     public void testConfig() {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "target/test-classes/log4j2-mapfilter.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-mapfilter.xml");
         final Configuration config = ctx.getConfiguration();
         final Filter filter = config.getFilter();
         assertNotNull("No MapFilter", filter);

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/StructuredDataFilterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/StructuredDataFilterTest.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/StructuredDataFilterTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/filter/StructuredDataFilterTest.java
Thu Jul 18 01:47:29 2013
@@ -66,7 +66,7 @@ public class StructuredDataFilterTest {
 
     @Test
     public void testConfig() {
-        final LoggerContext ctx = Configurator.initialize("Test1", null, "target/test-classes/log4j2-sdfilter.xml");
+        final LoggerContext ctx = Configurator.initialize("Test1", "target/test-classes/log4j2-sdfilter.xml");
         final Configuration config = ctx.getConfiguration();
         final Filter filter = config.getFilter();
         assertNotNull("No StructuredDataFilter", filter);

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java?rev=1504340&r1=1504339&r2=1504340&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggingTest.java
Thu Jul 18 01:47:29 2013
@@ -41,7 +41,7 @@ public class LoggingTest {
 
     @BeforeClass
     public static void setupClass() {
-        ctx = Configurator.initialize("Test1", null, CONFIG);
+        ctx = Configurator.initialize("Test1", CONFIG);
     }
 
     @AfterClass



Mime
View raw message