logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1592142 [2/2] - in /logging/log4j/log4j2/branches/experimental: ./ log4j-1.2-api/ log4j-api/src/main/java/org/apache/logging/log4j/ log4j-api/src/main/java/org/apache/logging/log4j/spi/ log4j-bom/ log4j-core/ log4j-core/src/main/java/org/a...
Date Sat, 03 May 2014 03:45:42 GMT
Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java Sat May  3 03:45:40 2014
@@ -814,7 +814,7 @@ public class StrSubstitutor {
                                 if (priorVariables == null) {
                                     priorVariables = new ArrayList<String>();
                                     priorVariables.add(new String(chars,
-                                            offset, length));
+                                            offset, length + lengthChange));
                                 }
 
                                 // handle cyclic substitution

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/net/MulticastDNSAdvertiser.java Sat May  3 03:45:40 2014
@@ -16,7 +16,6 @@
  */
 package org.apache.logging.log4j.core.net;
 
-import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.HashMap;

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java Sat May  3 03:45:40 2014
@@ -26,8 +26,8 @@ import java.util.Map;
 
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.core.config.Configuration;
-import org.apache.logging.log4j.core.config.plugins.PluginManager;
-import org.apache.logging.log4j.core.config.plugins.PluginType;
+import org.apache.logging.log4j.core.config.plugins.util.PluginManager;
+import org.apache.logging.log4j.core.config.plugins.util.PluginType;
 import org.apache.logging.log4j.core.helpers.Strings;
 import org.apache.logging.log4j.status.StatusLogger;
 

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/CollectionLoggingTest.java Sat May  3 03:45:40 2014
@@ -24,14 +24,45 @@ import java.util.Map;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.message.MapMessage;
+import org.apache.logging.log4j.test.appender.ListAppender;
+import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
+import static org.junit.Assert.assertNotNull;
+
 /**
  * Work in progress.
  */
 public class CollectionLoggingTest {
 
+    private static final String CONFIG = "log4j-collectionLogging.xml";
+    private static LoggerContext ctx;
+    private ListAppender app;
+
+
+    @BeforeClass
+    public static void beforeClass() {
+        System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
+        ctx = (LoggerContext) LogManager.getContext();
+        ctx.reconfigure();
+    }
+
+    @Before
+    public void before() {
+        Configuration config = ctx.getConfiguration();
+        for (final Map.Entry<String, Appender> entry : config.getAppenders().entrySet()) {
+            if (entry.getKey().equals("List")) {
+                app = (ListAppender) entry.getValue();
+            }
+        }
+        assertNotNull("No Appender", app);
+        app.clear();
+    }
+
     @Test
     public void testSystemProperties() {
         final Logger logger = LogManager.getLogger(CollectionLoggingTest.class.getName());

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSourceTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSourceTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSourceTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/DataSourceConnectionSourceTest.java Sat May  3 03:45:40 2014
@@ -24,8 +24,14 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.sql.DataSource;
 
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.apache.logging.log4j.status.StatusLogger;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -54,6 +60,17 @@ public class DataSourceConnectionSourceT
         this.jndiURL = jndiURL;
     }
 
+    private static final String CONFIG = "log4j-fatalOnly.xml";
+
+    @BeforeClass
+    public static void beforeClass() {
+        System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
+        LoggerContext ctx = (LoggerContext) LogManager.getContext();
+        ctx.reconfigure();
+        StatusLogger logger = StatusLogger.getLogger();
+        logger.setLevel(Level.FATAL);
+    }
+
     @Before
     public void setUp() throws NamingException {
         MockContextFactory.setAsInitial();

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSourceTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSourceTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSourceTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSourceTest.java Sat May  3 03:45:40 2014
@@ -20,9 +20,15 @@ import java.sql.Connection;
 import java.sql.SQLException;
 import javax.sql.DataSource;
 
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.apache.logging.log4j.status.StatusLogger;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 
 import static org.easymock.EasyMock.*;
@@ -30,6 +36,16 @@ import static org.junit.Assert.*;
 
 public class FactoryMethodConnectionSourceTest {
     private static ThreadLocal<Object> holder = new ThreadLocal<Object>();
+    private static final String CONFIG = "log4j-fatalOnly.xml";
+
+    @BeforeClass
+    public static void beforeClass() {
+        System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
+        LoggerContext ctx = (LoggerContext) LogManager.getContext();
+        ctx.reconfigure();
+        StatusLogger logger = StatusLogger.getLogger();
+        logger.setLevel(Level.FATAL);
+    }
 
     @AfterClass
     public static void tearDownClass() {

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java Sat May  3 03:45:40 2014
@@ -27,8 +27,11 @@ import org.apache.logging.log4j.core.app
 import org.apache.logging.log4j.core.config.xml.XMLConfiguration;
 import org.apache.logging.log4j.core.layout.PatternLayout;
 import org.apache.logging.log4j.junit.InitialLoggerContext;
+import org.apache.logging.log4j.status.StatusConsoleListener;
+import org.apache.logging.log4j.status.StatusListener;
 import org.apache.logging.log4j.status.StatusLogger;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -42,6 +45,12 @@ public class CustomConfigurationTest {
 
     public static final String LOG_FILE = "target/test.log";
 
+    @BeforeClass
+    public static void before() {
+        System.setProperty("log4j.level", "info");
+        System.setProperty("log.level", "info");
+    }
+
     @Rule
     public InitialLoggerContext init = new InitialLoggerContext("log4j-props.xml");
 
@@ -53,12 +62,16 @@ public class CustomConfigurationTest {
     @Test
     public void testConfig() {
         // don't bother using "error" since that's the default; try another level
-        System.setProperty("log4j.level", "info");
         final LoggerContext ctx = this.init.getContext();
         ctx.reconfigure();
         final Configuration config = ctx.getConfiguration();
         assertTrue("Configuration is not an XMLConfiguration", config instanceof XMLConfiguration);
-        assertSame(StatusLogger.getLogger().getLevel(), Level.INFO);
+        for (StatusListener listener : StatusLogger.getLogger().getListeners()) {
+            if (listener instanceof StatusConsoleListener) {
+                assertSame(listener.getStatusLevel(), Level.INFO);
+                break;
+            }
+        }
         Layout<? extends Serializable> layout = PatternLayout.createLayout(PatternLayout.SIMPLE_CONVERSION_PATTERN, config, null,
             null,null, null, null, null);
         Appender appender = FileAppender.createAppender(LOG_FILE, "false", "false", "File", "true",

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/xml/XMLConfigurationPropsTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/xml/XMLConfigurationPropsTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/xml/XMLConfigurationPropsTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/config/xml/XMLConfigurationPropsTest.java Sat May  3 03:45:40 2014
@@ -56,7 +56,7 @@ public class XMLConfigurationPropsTest {
     @Test
     public void testDefaultStatus() {
         System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG1);
-        System.setProperty(Constants.LOG4J_DEFAULT_STATUS_LEVEL, "DEBUG");
+        System.setProperty(Constants.LOG4J_DEFAULT_STATUS_LEVEL, "WARN");
         try {
             final LoggerContext ctx = (LoggerContext) LogManager.getContext();
             ctx.reconfigure();
@@ -70,7 +70,7 @@ public class XMLConfigurationPropsTest {
     @Test
     public void testWithConfigProp() {
         System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
-        System.setProperty("log4j.level", "debug");
+        System.setProperty("log4j.level", "warn");
         try {
             final LoggerContext ctx = (LoggerContext) LogManager.getContext();
             ctx.reconfigure();
@@ -85,8 +85,8 @@ public class XMLConfigurationPropsTest {
     @Test
     public void testWithProps() {
         System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, CONFIG);
-        System.setProperty("log4j.level", "debug");
-        System.setProperty("log.level", "debug");
+        System.setProperty("log4j.level", "warn");
+        System.setProperty("log.level", "warn");
         try {
             final LoggerContext ctx = (LoggerContext) LogManager.getContext();
             ctx.reconfigure();

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/HTMLLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/HTMLLayoutTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/HTMLLayoutTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/HTMLLayoutTest.java Sat May  3 03:45:40 2014
@@ -17,10 +17,12 @@
 package org.apache.logging.log4j.core.layout;
 
 import java.util.List;
+import java.util.Map;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.BasicConfigurationFactory;
 import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -91,7 +93,10 @@ public class HTMLLayoutTest {
     }
 
     private void testLayout(boolean includeLocation) {
-
+        final Map<String, Appender> appenders = root.getAppenders();
+        for (Appender appender : appenders.values()) {
+            root.removeAppender(appender);
+        }
         // set up appender
         final HTMLLayout layout = HTMLLayout.createLayout("" + includeLocation, null, null, null, "small", null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
@@ -134,6 +139,8 @@ public class HTMLLayoutTest {
         } else {
             assertFalse("Location should not be in the output table", html.contains("<td>HTMLLayoutTest.java:"));
         }
-
+        for (Appender app : appenders.values()) {
+            root.addAppender(app);
+        }
     }
 }

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/JSONLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/JSONLayoutTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/JSONLayoutTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/JSONLayoutTest.java Sat May  3 03:45:40 2014
@@ -20,10 +20,12 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertTrue;
 
 import java.util.List;
+import java.util.Map;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.BasicConfigurationFactory;
 import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -73,7 +75,10 @@ public class JSONLayoutTest {
      */
     @Test
     public void testLayout() throws Exception {
-
+        final Map<String, Appender> appenders = root.getAppenders();
+        for (Appender appender : appenders.values()) {
+            root.removeAppender(appender);
+        }
         // set up appender
         final JSONLayout layout = JSONLayout.createLayout("true", "true", "true", "false", null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
@@ -124,11 +129,17 @@ public class JSONLayoutTest {
         this.checkAt("\"logger\":\"root\",", 2, list);
         this.checkAt("\"level\":\"DEBUG\",", 4, list);
         this.checkAt("\"message\":\"starting mdc pattern test\",", 6, list);
+        for (Appender app : appenders.values()) {
+            root.addAppender(app);
+        }
     }
 
     @Test
     public void testEscapeLayout() throws Exception {
-
+        final Map<String, Appender> appenders = root.getAppenders();
+        for (Appender appender : appenders.values()) {
+            root.removeAppender(appender);
+        }
         // set up appender
         final JSONLayout layout = JSONLayout.createLayout("true", "true", "true", "false", null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
@@ -150,6 +161,9 @@ public class JSONLayoutTest {
         this.checkAt("\"logger\":\"root\",", 2, list);
         this.checkAt("\"level\":\"DEBUG\",", 4, list);
         this.checkAt("\"message\":\"Here is a quote ' and then a double quote \\\"\",", 6, list);
+        for (Appender app : appenders.values()) {
+            root.addAppender(app);
+        }
     }
 
     private void checkAt(String expected, int lineIndex, List<String> list) {

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java Sat May  3 03:45:40 2014
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertNot
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.BasicConfigurationFactory;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.Logger;
@@ -36,6 +37,8 @@ import org.junit.After;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
+import java.util.Map;
+
 /**
  *
  */
@@ -77,6 +80,10 @@ public class PatternLayoutTest {
         final String mdcMsgPattern3 = "%m : %X{key2}%n";
         final String mdcMsgPattern4 = "%m : %X{key3}%n";
         final String mdcMsgPattern5 = "%m : %X{key1},%X{key2},%X{key3}%n";
+        final Map<String, Appender> appenders = root.getAppenders();
+        for (Appender appender : appenders.values()) {
+            root.removeAppender(appender);
+        }
 
         // set up appender
         final PatternLayout layout = PatternLayout.createLayout(msgPattern, ctx.getConfiguration(), null, null, null,
@@ -137,6 +144,10 @@ public class PatternLayoutTest {
         root.removeAppender(appender);
 
         appender.stop();
+
+        for (Appender app : appenders.values()) {
+            root.addAppender(app);
+        }
     }
 
     @Test

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/SerializedLayoutTest.java Sat May  3 03:45:40 2014
@@ -20,10 +20,13 @@ import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.LoggingException;
 import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.BasicConfigurationFactory;
 import org.apache.logging.log4j.core.LogEvent;
 import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.impl.Log4jLogEvent;
+import org.apache.logging.log4j.message.SimpleMessage;
 import org.apache.logging.log4j.test.appender.ListAppender;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.junit.AfterClass;
@@ -31,11 +34,16 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.util.List;
+import java.util.Map;
 
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
 
 /**
  *
@@ -75,7 +83,10 @@ public class SerializedLayoutTest {
      */
     @Test
     public void testLayout() throws Exception {
-
+        final Map<String, Appender> appenders = root.getAppenders();
+        for (Appender appender : appenders.values()) {
+            root.removeAppender(appender);
+        }
         // set up appender
         final SerializedLayout layout = SerializedLayout.createLayout();
         final ListAppender appender = new ListAppender("List", null, layout, false, true);
@@ -123,6 +134,31 @@ public class SerializedLayoutTest {
             assertTrue("Incorrect event", event.toString().equals(expected[i]));
             ++i;
         }
+        for (Appender app : appenders.values()) {
+            root.addAppender(app);
+        }
+    }
 
+    @Test
+    public void testSerialization() throws Exception {
+        final SerializedLayout layout = SerializedLayout.createLayout();
+        final Throwable throwable = new LoggingException("Test");
+        final LogEvent event = new Log4jLogEvent(this.getClass().getName(), null,
+            "org.apache.logging.log4j.core.Logger", Level.INFO, new SimpleMessage("Hello, world!"), throwable);
+        final byte[] result = layout.toByteArray(event);
+        assertNotNull(result);
+        //FileOutputStream fos = new FileOutputStream("target/serializedEvent.dat");
+        //fos.write(layout.getHeader());
+        //fos.write(result);
+        //fos.close();
+    }
+
+    @Test
+    public void testDeserialization() throws Exception {
+        File file = new File("target/test-classes/serializedEvent.dat");
+        FileInputStream fis = new FileInputStream(file);
+        ObjectInputStream ois = new ObjectInputStream(fis);
+        final LogEvent event = (LogEvent) ois.readObject();
+        assertNotNull(event);
     }
 }

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java Sat May  3 03:45:40 2014
@@ -20,12 +20,14 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertTrue;
 
 import java.util.List;
+import java.util.Map;
 
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Marker;
 import org.apache.logging.log4j.MarkerManager;
 import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.Appender;
 import org.apache.logging.log4j.core.BasicConfigurationFactory;
 import org.apache.logging.log4j.core.Logger;
 import org.apache.logging.log4j.core.LoggerContext;
@@ -77,7 +79,10 @@ public class XMLLayoutTest {
      */
     @Test
     public void testLayout() throws Exception {
-
+        final Map<String, Appender> appenders = root.getAppenders();
+        for (Appender appender : appenders.values()) {
+            root.removeAppender(appender);
+        }
         // set up appender
         final XMLLayout layout = XMLLayout.createLayout("true", "true", "true", null, null, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
@@ -117,5 +122,8 @@ public class XMLLayoutTest {
 
         assertTrue("Missing Marker-Tag, Expected " + markerTag + ", Actual" + list.get(list.size() - 4),
                 list.get(list.size() - 4).contains(markerTag));
+        for (Appender app : appenders.values()) {
+            root.addAppender(app);
+        }
     }
 }

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-filetest.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-filetest.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-filetest.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-filetest.xml Sat May  3 03:45:40 2014
@@ -16,7 +16,7 @@
  limitations under the License.
 
 -->
-<Configuration status="OFF" dest="target/status.log" name="XMLConfigTest">
+<Configuration status="debug" dest="target/status.log" name="XMLConfigTest">
   <Properties>
     <Property name="filename">target/test.log</Property>
   </Properties>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-reference-level.json
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-reference-level.json?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-reference-level.json (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-reference-level.json Sat May  3 03:45:40 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-{ "configuration": { "status": "debug", "XMLConfigTest": "RoutingTest",
+{ "configuration": { "status": "error", "XMLConfigTest": "RoutingTest",
     "appenders": {
         "appender": [
             { "type": "Console", "name": "STDOUT", "PatternLayout": { "pattern": "%m%n" }},

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-routing2.json
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-routing2.json?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-routing2.json (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/log4j-routing2.json Sat May  3 03:45:40 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-{ "configuration": { "status": "debug", "name": "RoutingTest",
+{ "configuration": { "status": "error", "name": "RoutingTest",
       "properties": {
         "property": { "name": "filename", "value" : "target/rolling1/rollingtest-$${sd:type}.log" }
       },

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-data-source.xml Sat May  3 03:45:40 2014
@@ -33,11 +33,11 @@
   </Appenders>
 
   <Loggers>
-    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug" additivity="false">
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-h2-factory-method.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-h2-factory-method.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-h2-factory-method.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-h2-factory-method.xml Sat May  3 03:45:40 2014
@@ -34,11 +34,11 @@
   </Appenders>
 
   <Loggers>
-    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug" additivity="false">
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-hsqldb-factory-method.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-hsqldb-factory-method.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-hsqldb-factory-method.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jdbc/log4j2-hsqldb-factory-method.xml Sat May  3 03:45:40 2014
@@ -34,11 +34,11 @@
   </Appenders>
 
   <Loggers>
-    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug" additivity="false">
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-base.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-base.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-base.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-base.xml Sat May  3 03:45:40 2014
@@ -26,11 +26,11 @@
   </Appenders>
 
   <Loggers>
-    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug" additivity="false">
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-basic.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-basic.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-basic.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-h2-jpa-basic.xml Sat May  3 03:45:40 2014
@@ -30,7 +30,7 @@
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-base.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-base.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-base.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-base.xml Sat May  3 03:45:40 2014
@@ -26,11 +26,11 @@
   </Appenders>
 
   <Loggers>
-    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug">
+    <Logger name="org.apache.logging.log4j.core.appender.db" level="debug" additivity="false">
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-basic.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-basic.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-basic.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-core/src/test/resources/org/apache/logging/log4j/core/appender/db/jpa/log4j2-hsqldb-jpa-basic.xml Sat May  3 03:45:40 2014
@@ -30,7 +30,7 @@
       <AppenderRef ref="databaseAppender" />
     </Logger>
 
-    <Root level="error">
+    <Root level="fatal">
       <AppenderRef ref="STDOUT"/>
     </Root>
   </Loggers>

Modified: logging/log4j/log4j2/branches/experimental/log4j-flume-ng/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-flume-ng/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-flume-ng/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-flume-ng/pom.xml Sat May  3 03:45:40 2014
@@ -39,10 +39,6 @@
     </dependency>
     <dependency>
       <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-plugin-processor</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-core</artifactId>
     </dependency>
     <dependency>
@@ -137,6 +133,16 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.logging.log4j.flume</Bundle-SymbolicName>
+            <Export-Package>org.apache.logging.log4j.flume.appender</Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <reporting>

Modified: logging/log4j/log4j2/branches/experimental/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java Sat May  3 03:45:40 2014
@@ -40,8 +40,8 @@ import org.apache.flume.event.SimpleEven
 import org.apache.logging.log4j.LoggingException;
 import org.apache.logging.log4j.core.appender.ManagerFactory;
 import org.apache.logging.log4j.core.config.Property;
-import org.apache.logging.log4j.core.config.plugins.PluginManager;
-import org.apache.logging.log4j.core.config.plugins.PluginType;
+import org.apache.logging.log4j.core.config.plugins.util.PluginManager;
+import org.apache.logging.log4j.core.config.plugins.util.PluginType;
 import org.apache.logging.log4j.core.helpers.FileUtils;
 import org.apache.logging.log4j.core.helpers.SecretKeyProvider;
 import org.apache.logging.log4j.core.helpers.Strings;

Modified: logging/log4j/log4j2/branches/experimental/log4j-jcl/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-jcl/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-jcl/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-jcl/pom.xml Sat May  3 03:45:40 2014
@@ -76,6 +76,15 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Export-Package>org.apache.logging.log4j.jcl</Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <reporting>

Modified: logging/log4j/log4j2/branches/experimental/log4j-jmx-gui/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-jmx-gui/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-jmx-gui/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-jmx-gui/pom.xml Sat May  3 03:45:40 2014
@@ -73,6 +73,15 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Export-Package>org.apache.logging.log4j.jmx.gui</Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <reporting>

Modified: logging/log4j/log4j2/branches/experimental/log4j-samples/flume-common/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-samples/flume-common/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-samples/flume-common/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-samples/flume-common/pom.xml Sat May  3 03:45:40 2014
@@ -65,4 +65,12 @@
       <scope>test</scope>
     </dependency>
   </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
 </project>

Modified: logging/log4j/log4j2/branches/experimental/log4j-samples/flume-embedded/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-samples/flume-embedded/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-samples/flume-embedded/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-samples/flume-embedded/pom.xml Sat May  3 03:45:40 2014
@@ -134,6 +134,10 @@
           </systemProperties>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 </project>

Modified: logging/log4j/log4j2/branches/experimental/log4j-samples/flume-remote/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-samples/flume-remote/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-samples/flume-remote/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-samples/flume-remote/pom.xml Sat May  3 03:45:40 2014
@@ -122,6 +122,10 @@
           </systemProperties>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 </project>

Modified: logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/pom.xml Sat May  3 03:45:40 2014
@@ -126,6 +126,18 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Export-Package>
+              org.apache.logging.slf4j,
+              org.slf4j.impl
+            </Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <reporting>

Modified: logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarker.java Sat May  3 03:45:40 2014
@@ -30,6 +30,8 @@ import java.util.List;
  */
 public class Log4jMarker implements Marker {
 
+    public static final long serialVersionUID = 1590472L;
+
     private final IMarkerFactory factory = StaticMarkerBinder.SINGLETON.getMarkerFactory();
 
     private final org.apache.logging.log4j.Marker marker;
@@ -69,6 +71,7 @@ public class Log4jMarker implements Mark
     }
 
     @Override
+    @SuppressWarnings("rawtypes")
     public Iterator iterator() {
         List<Marker> parents = new ArrayList<Marker>();
         for (org.apache.logging.log4j.Marker m : this.marker.getParents()) {

Modified: logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/package-info.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/package-info.java?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/package-info.java (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/package-info.java Sat May  3 03:45:40 2014
@@ -15,6 +15,8 @@
  * limitations under the license.
  */
 /**
- * SLF4J support.
+ * SLF4J support. Note that this does indeed share the same package namespace as the one found in log4j-to-slf4j;
+ * this is intentional. The two JARs should <em>not</em> be used at the same time! Thus, in an OSGi environment
+ * where split packages are not allowed, this error is prevented due to both JARs sharing an exported package name.
  */
 package org.apache.logging.slf4j;

Modified: logging/log4j/log4j2/branches/experimental/log4j-taglib/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-taglib/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-taglib/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-taglib/pom.xml Sat May  3 03:45:40 2014
@@ -93,6 +93,10 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
   <reporting>

Modified: logging/log4j/log4j2/branches/experimental/log4j-to-slf4j/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/log4j-to-slf4j/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/log4j-to-slf4j/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/log4j-to-slf4j/pom.xml Sat May  3 03:45:40 2014
@@ -80,6 +80,15 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Export-Package>org.apache.logging.slf4j</Export-Package>
+          </instructions>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <reporting>

Modified: logging/log4j/log4j2/branches/experimental/pom.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/pom.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/pom.xml (original)
+++ logging/log4j/log4j2/branches/experimental/pom.xml Sat May  3 03:45:40 2014
@@ -150,13 +150,13 @@
     <url>http://www.apache.org</url>
   </organization>
   <properties>
-    <slf4j.version>1.7.6</slf4j.version>
+    <slf4j.version>1.7.7</slf4j.version>
     <logback.version>1.0.13</logback.version>
     <log4jParentDir>${basedir}</log4jParentDir>
     <Log4jReleaseVersion>2.0-rc1</Log4jReleaseVersion>
     <Log4jReleaseCount>eleventh</Log4jReleaseCount>
     <jackson1.version>1.9.13</jackson1.version>
-    <jackson2.version>2.3.2</jackson2.version>
+    <jackson2.version>2.3.3</jackson2.version>
     <spring.version>3.2.8.RELEASE</spring.version>
     <flumeVersion>1.4.0</flumeVersion>
     <disruptor.version>3.2.1</disruptor.version>
@@ -254,18 +254,6 @@
       </dependency>
       <dependency>
         <groupId>org.apache.logging.log4j</groupId>
-        <artifactId>log4j-plugin-processor</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.logging.log4j</groupId>
-        <artifactId>log4j-plugin-processor</artifactId>
-        <version>${project.version}</version>
-        <type>test-jar</type>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.logging.log4j</groupId>
         <artifactId>log4j-core</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -902,7 +890,6 @@
   <modules>
     <module>log4j-api</module>
     <module>log4j-core</module>
-    <module>log4j-osgi</module>
     <module>log4j-1.2-api</module>
     <module>log4j-slf4j-impl</module>
     <module>log4j-to-slf4j</module>
@@ -912,7 +899,7 @@
     <module>log4j-jmx-gui</module>
     <module>log4j-samples</module>
     <module>log4j-bom</module>
-    <module>log4j-plugin-processor</module>
+    <module>log4j-nosql</module>
   </modules>
   <profiles>
     <profile>

Modified: logging/log4j/log4j2/branches/experimental/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/src/changes/changes.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/branches/experimental/src/changes/changes.xml Sat May  3 03:45:40 2014
@@ -21,6 +21,31 @@
   </properties>
   <body>
     <release version="2.0-rc2" date="2014-MM-DD" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-542" dev="rgoers" type="fix">
+        Make Throwable transient in ThrowableProxy.
+      </action>
+      <action issue="LOG4J2-617" dev="mattsicker" type="update">
+        Update SLF4J to 1.7.7.
+      </action>
+      <action issue="LOG4J2-616" dev="mattsicker" type="update">
+        Update Jackson to 2.3.3.
+      </action>
+      <action issue="LOG4J2-440" dev="mattsicker" type="fix">
+        During shutdown, a NullPointerException could be thrown due to the NullConfiguration class no longer being
+        available to the ClassLoader.
+      </action>
+      <action issue="LOG4J2-346" dev="mattsicker" type="fix">
+        Cyclic dependency with log4j-slf4j-impl in OSGi.
+      </action>
+      <action issue="LOG4J2-345" dev="mattsicker" type="fix">
+        The log4j-1.2-api module didn't export any packages to OSGi.
+      </action>
+      <action issue="LOG4J2-605" dev="mattsicker" type="fix">
+        Password data from the NoSQL plugins no longer shows up in cleartext in debug logging.
+      </action>
+      <action issue="LOG4J2-448" dev="rgoers" type="fix" due-to="X86core">
+        A StringIndexOutOfBounds exception could occur during property substitution.
+      </action>
       <action issue="LOG4J2-597" dev="rgoers" type="fix">
         StatusLogger was not skipping multiple instances of the FQCN class, causing messages from classes in
         the Verbose list to be printed.

Modified: logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/configuration.xml.vm
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/configuration.xml.vm?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/configuration.xml.vm (original)
+++ logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/configuration.xml.vm Sat May  3 03:45:40 2014
@@ -1067,7 +1067,7 @@ public class Bar {
 <pre>
 2011-11-23 17:08:00,769 DEBUG Generated plugins in 0.003374000 seconds
 2011-11-23 17:08:00,789 DEBUG Calling createProperty on class org.apache.logging.log4j.core.config.Property for element property with params(name="filename", value="target/rolling1/rollingtest-${dollar}{sd:type}.log")
-2011-11-23 17:08:00,792 DEBUG Calling configureSubstitutor on class org.apache.logging.log4j.core.config.plugins.PropertiesPlugin for element properties with params(properties={filename=target/rolling1/rollingtest-${dollar}{sd:type}.log})
+2011-11-23 17:08:00,792 DEBUG Calling configureSubstitutor on class org.apache.logging.log4j.core.config.plugins.util.PropertiesPlugin for element properties with params(properties={filename=target/rolling1/rollingtest-${dollar}{sd:type}.log})
 2011-11-23 17:08:00,794 DEBUG Generated plugins in 0.001362000 seconds
 2011-11-23 17:08:00,797 DEBUG Calling createFilter on class org.apache.logging.log4j.core.filter.ThresholdFilter for element ThresholdFilter with params(level="debug", onMatch="null", onMismatch="null")
 2011-11-23 17:08:00,800 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern="%m%n", Configuration(RoutingTest), null, charset="null")
@@ -1080,12 +1080,12 @@ public class Bar {
 2011-11-23 17:08:00,824 DEBUG Calling createRoute on class org.apache.logging.log4j.core.appender.routing.Route for element Route with params(AppenderRef="List", key="Service", Node=Route)
 2011-11-23 17:08:00,825 DEBUG Calling createRoutes on class org.apache.logging.log4j.core.appender.routing.Routes for element Routes with params(pattern="${dollar}{sd:type}", routes={Route(type=dynamic default), Route(type=static Reference=STDOUT key='Audit'), Route(type=static Reference=List key='Service')})
 2011-11-23 17:08:00,827 DEBUG Calling createAppender on class org.apache.logging.log4j.core.appender.routing.RoutingAppender for element Routing with params(name="Routing", ignoreExceptions="null", Routes({Route(type=dynamic default),Route(type=static Reference=STDOUT key='Audit'),Route(type=static Reference=List key='Service')}), Configuration(RoutingTest), null, null)
-2011-11-23 17:08:00,827 DEBUG Calling createAppenders on class org.apache.logging.log4j.core.config.plugins.AppendersPlugin for element appenders with params(appenders={STDOUT, List, Routing})
+2011-11-23 17:08:00,827 DEBUG Calling createAppenders on class org.apache.logging.log4j.core.config.plugins.util.AppendersPlugin for element appenders with params(appenders={STDOUT, List, Routing})
 2011-11-23 17:08:00,828 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.plugins.AppenderRefPlugin for element AppenderRef with params(ref="Routing")
 2011-11-23 17:08:00,829 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig for element logger with params(additivity="false", level="info", name="EventLogger", AppenderRef={Routing}, null)
 2011-11-23 17:08:00,830 DEBUG Calling createAppenderRef on class org.apache.logging.log4j.core.config.plugins.AppenderRefPlugin for element AppenderRef with params(ref="STDOUT")
 2011-11-23 17:08:00,831 DEBUG Calling createLogger on class org.apache.logging.log4j.core.config.LoggerConfig$RootLogger for element root with params(additivity="null", level="error", AppenderRef={STDOUT}, null)
-2011-11-23 17:08:00,833 DEBUG Calling createLoggers on class org.apache.logging.log4j.core.config.plugins.LoggersPlugin for element loggers with params(loggers={EventLogger, root})
+2011-11-23 17:08:00,833 DEBUG Calling createLoggers on class org.apache.logging.log4j.core.config.plugins.util.LoggersPlugin for element loggers with params(loggers={EventLogger, root})
 2011-11-23 17:08:00,834 DEBUG Reconfiguration completed
 2011-11-23 17:08:00,846 DEBUG Calling createLayout on class org.apache.logging.log4j.core.layout.PatternLayout for element PatternLayout with params(pattern="%d %p %c{1.} [%t] %m%n", Configuration(RoutingTest), null, charset="null")
 2011-11-23 17:08:00,849 DEBUG Calling createPolicy on class org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy for element SizeBasedTriggeringPolicy with params(size="500")

Modified: logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/layouts.xml.vm
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/layouts.xml.vm?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/layouts.xml.vm (original)
+++ logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/layouts.xml.vm Sat May  3 03:45:40 2014
@@ -393,6 +393,41 @@ WARN  [main]: Message 2</pre>
             </tr>
             <tr>
               <td align="center">
+                <b>enc{pattern}</b><br />
+                <b>encode{pattern}</b>
+              </td>
+              <td>
+                <p>
+                  Encodes special characters such as '\n' and HTML characters to help prevent log forging 
+                  and some XSS attacks that could occur when displaying logs in a web browser. Anytime 
+                  user provided data is logged, this can provide a safeguard.   
+                </p>
+                <p>
+                  A typical usage would encode the message
+                  <pre>%enc{%m}</pre>
+                  but user input could come from other locations as well, such as the MDC
+                  <pre>%enc{%mdc{key}}</pre>
+                </p>
+                <p>The replaced characters are:
+                 <table>
+                   <tr>
+                     <th>Character</th>
+                     <th>Replacement</th>
+                   </tr>
+                   <tr>
+                     <th>'\r', '\n'</th>
+                     <th>Removed from the pattern</th>
+                   </tr>
+                   <tr>
+                     <td>&amp;, &lt;, &gt;, &quot;, &apos;, &#x2F;</td>
+                     <td>Replaced with the corresponding HTML entity</td>
+                   </tr>
+                 </table>
+                </p>
+              </td>
+            </tr>
+            <tr>
+              <td align="center">
                 <b>ex</b>|<b>exception</b>|<b>throwable</b><br />
                 &nbsp;&nbsp;{["none"<br />
                 &nbsp;&nbsp;|"full"<br />

Modified: logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/plugins.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/plugins.xml?rev=1592142&r1=1592141&r2=1592142&view=diff
==============================================================================
--- logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/plugins.xml (original)
+++ logging/log4j/log4j2/branches/experimental/src/site/xdoc/manual/plugins.xml Sat May  3 03:45:40 2014
@@ -136,7 +136,7 @@
     </execution>
   </executions>
   <configuration>
-    <mainClass>org.apache.logging.log4j.core.config.plugins.PluginManager</mainClass>
+    <mainClass>org.apache.logging.log4j.core.config.plugins.util.PluginManager</mainClass>
     <arguments>
       <argument>${project.build.outputDirectory}</argument>
       <argument>org.myorg.myproject.log4j</argument>



Mime
View raw message