logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1548155 - in /logging/log4j/log4j2/trunk: log4j-api/src/main/java/org/apache/logging/log4j/message/ log4j-api/src/main/java/org/apache/logging/log4j/simple/ log4j-api/src/main/java/org/apache/logging/log4j/spi/ log4j-api/src/main/java/org/...
Date Thu, 05 Dec 2013 14:43:41 GMT
Author: ggregory
Date: Thu Dec  5 14:43:40 2013
New Revision: 1548155

URL: http://svn.apache.org/r1548155
Log:
Start work on making The AbstractLogger implement Serializable.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/AbstractMessageFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/FormattedMessageFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessageFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessageFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLogger.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerWrapper.java
    logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
    logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
    logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java
    logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
    logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/AbstractMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/AbstractMessageFactory.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/AbstractMessageFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/AbstractMessageFactory.java
Thu Dec  5 14:43:40 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.logging.log4j.message;
 
+import java.io.Serializable;
+
 /**
  * Provides an abstract superclass for MessageFactory implementations with default implementations.
  * <p>
@@ -24,7 +26,9 @@ package org.apache.logging.log4j.message
  *
  * @version $Id$
  */
-public abstract class AbstractMessageFactory implements MessageFactory {
+public abstract class AbstractMessageFactory implements MessageFactory, Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     /*
      * (non-Javadoc)

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/FormattedMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/FormattedMessageFactory.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/FormattedMessageFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/FormattedMessageFactory.java
Thu Dec  5 14:43:40 2013
@@ -24,6 +24,8 @@ package org.apache.logging.log4j.message
  */
 public class FormattedMessageFactory extends AbstractMessageFactory {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * Creates {@link StringFormattedMessage} instances.
      *

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessageFactory.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessageFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessageFactory.java
Thu Dec  5 14:43:40 2013
@@ -26,6 +26,8 @@ import java.util.ResourceBundle;
  */
 public class LocalizedMessageFactory extends AbstractMessageFactory {
 
+    private static final long serialVersionUID = 1L;
+    
     private final ResourceBundle bundle;
     private final String bundleId;
 

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessageFactory.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessageFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessageFactory.java
Thu Dec  5 14:43:40 2013
@@ -24,6 +24,8 @@ package org.apache.logging.log4j.message
  */
 public class MessageFormatMessageFactory extends AbstractMessageFactory {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * Creates {@link org.apache.logging.log4j.message.StringFormattedMessage} instances.
      * @param message The message pattern.

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessageFactory.java
Thu Dec  5 14:43:40 2013
@@ -29,6 +29,8 @@ package org.apache.logging.log4j.message
  */
 public final class ParameterizedMessageFactory extends AbstractMessageFactory {
 
+    private static final long serialVersionUID = 1L;
+    
     /**
      * Instance of StringFormatterMessageFactory.
      */

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormatterMessageFactory.java
Thu Dec  5 14:43:40 2013
@@ -29,6 +29,8 @@ package org.apache.logging.log4j.message
  */
 public final class StringFormatterMessageFactory extends AbstractMessageFactory {
 
+    private static final long serialVersionUID = 1L;
+    
     /**
      * Instance of StringFormatterMessageFactory.
      */

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/simple/SimpleLogger.java
Thu Dec  5 14:43:40 2013
@@ -36,6 +36,8 @@ import org.apache.logging.log4j.util.Pro
  */
 public class SimpleLogger extends AbstractLogger {
 
+    private static final long serialVersionUID = 1L;
+
     private static final char SPACE = ' ';
 
 	/**

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
Thu Dec  5 14:43:40 2013
@@ -16,6 +16,8 @@
  */
 package org.apache.logging.log4j.spi;
 
+import java.io.Serializable;
+
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.Marker;
@@ -28,9 +30,10 @@ import org.apache.logging.log4j.status.S
 
 /**
  * Base implementation of a Logger. It is highly recommended that any Logger implementation
extend this class.
- *
  */
-public abstract class AbstractLogger implements Logger {
+public abstract class AbstractLogger implements Logger, Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     /**
      * Marker for flow tracing.

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerWrapper.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerWrapper.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerWrapper.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerWrapper.java
Thu Dec  5 14:43:40 2013
@@ -26,6 +26,7 @@ import org.apache.logging.log4j.message.
  */
 public class AbstractLoggerWrapper extends AbstractLogger {
 
+    private static final long serialVersionUID = 1L;
     /**
      * The wrapped Logger.
      */

Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusLogger.java
Thu Dec  5 14:43:40 2013
@@ -37,6 +37,8 @@ import org.apache.logging.log4j.util.Pro
  */
 public final class StatusLogger extends AbstractLogger {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * System property that can be configured with the number of entries in the queue. Once
the limit
      * is reached older entries will be removed as new entries are added.

Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
Thu Dec  5 14:43:40 2013
@@ -30,6 +30,8 @@ import static org.junit.Assert.*;
  */
 public class AbstractLoggerTest extends AbstractLogger {
 
+    private static final long serialVersionUID = 1L;
+
     private static class LogEvent {
 
         String markerName;

Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java
Thu Dec  5 14:43:40 2013
@@ -31,6 +31,8 @@ import java.util.Map;
  */
 public class TestLogger extends AbstractLogger {
 
+    private static final long serialVersionUID = 1L;
+
     public TestLogger() {
         super();
     }

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
Thu Dec  5 14:43:40 2013
@@ -39,6 +39,8 @@ import org.apache.logging.log4j.spi.Abst
  */
 public class Logger extends AbstractLogger {
 
+    private static final long serialVersionUID = 1L;
+
     /**
      * config should be consistent across threads.
      */

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLogger.java
Thu Dec  5 14:43:40 2013
@@ -74,6 +74,7 @@ import com.lmax.disruptor.util.Util;
  * manner.
  */
 public class AsyncLogger extends Logger {
+    private static final long serialVersionUID = 1L;
     private static final int HALF_A_SECOND = 500;
     private static final int MAX_DRAIN_ATTEMPTS_BEFORE_SHUTDOWN = 20;
     private static final int RINGBUFFER_MIN_SIZE = 128;

Modified: logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-jcl/src/main/java/org/apache/logging/log4j/jcl/Log4jLog.java
Thu Dec  5 14:43:40 2013
@@ -25,7 +25,9 @@ import org.apache.logging.log4j.spi.Abst
  */
 public class Log4jLog extends AbstractLoggerWrapper implements Log {
 
-    public Log4jLog(final AbstractLogger logger, final String name) {
+    private static final long serialVersionUID = 1L;
+
+	public Log4jLog(final AbstractLogger logger, final String name) {
         super(logger, name, null);
     }
 }

Modified: logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-taglib/src/main/java/org/apache/logging/log4j/taglib/Log4jTaglibLogger.java
Thu Dec  5 14:43:40 2013
@@ -28,7 +28,9 @@ import org.apache.logging.log4j.spi.Abst
  * @since 2.0
  */
 class Log4jTaglibLogger extends AbstractLoggerWrapper {
-    public Log4jTaglibLogger(final AbstractLogger logger, final String name, final MessageFactory
messageFactory) {
+    private static final long serialVersionUID = 1L;
+
+	public Log4jTaglibLogger(final AbstractLogger logger, final String name, final MessageFactory
messageFactory) {
         super(logger, name, messageFactory);
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java?rev=1548155&r1=1548154&r2=1548155&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/main/java/org/apache/logging/slf4j/SLF4JLogger.java
Thu Dec  5 14:43:40 2013
@@ -30,7 +30,8 @@ import org.slf4j.spi.LocationAwareLogger
  */
 public class SLF4JLogger extends AbstractLogger {
 
-    private final org.slf4j.Logger logger;
+    private static final long serialVersionUID = 1L;
+	private final org.slf4j.Logger logger;
     private final LocationAwareLogger locationAwareLogger;
 
     public SLF4JLogger(final String name, final org.slf4j.Logger logger) {



Mime
View raw message