logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattsic...@apache.org
Subject svn commit: r1583065 - in /logging/log4j/log4j2/trunk/log4j-slf4j-impl/src: main/java/org/apache/logging/slf4j/ main/java/org/slf4j/helpers/ main/java/org/slf4j/impl/ test/java/org/apache/logging/slf4j/
Date Sat, 29 Mar 2014 21:51:39 GMT
Author: mattsicker
Date: Sat Mar 29 21:51:38 2014
New Revision: 1583065

URL: http://svn.apache.org/r1583065
Log:
Move SLF4J impl classes where possible.

  - The remaining four need to stay where they are in the org.slf4j.* namespaces due to SLF4J
SPI requirements.
  - SLF4JLogger also renamed to Log4j2Logger.
  - See issue LOG4J2-564.

Added:
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/EventDataConverter.java
      - copied, changed from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4j2Logger.java
      - copied, changed from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jLoggerFactory.java
      - copied, changed from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jLoggerFactory.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMDCAdapter.java
      - copied, changed from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMDCAdapter.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarkerFactory.java
      - copied, changed from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMarkerFactory.java
Removed:
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jLoggerFactory.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMDCAdapter.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMarkerFactory.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java
Modified:
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
    logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java

Copied: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/EventDataConverter.java
(from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/EventDataConverter.java?p2=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/EventDataConverter.java&p1=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java&r1=1583058&r2=1583065&rev=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/EventDataConverter.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/EventDataConverter.java
Sat Mar 29 21:51:38 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.slf4j.helpers;
+package org.apache.logging.slf4j;
 
 import java.util.Map;
 

Copied: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4j2Logger.java
(from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4j2Logger.java?p2=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4j2Logger.java&p1=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java&r1=1583058&r2=1583065&rev=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/SLF4JLogger.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4j2Logger.java
Sat Mar 29 21:51:38 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.slf4j.impl;
+package org.apache.logging.slf4j;
 
 import java.io.IOException;
 import java.io.ObjectInputStream;
@@ -29,15 +29,14 @@ import org.apache.logging.log4j.message.
 import org.apache.logging.log4j.spi.LoggerProvider;
 import org.slf4j.Marker;
 import org.slf4j.MarkerFactory;
-import org.slf4j.helpers.EventDataConverter;
 import org.slf4j.spi.LocationAwareLogger;
 
 /**
- *
+ * SLF4J logger implementation that uses Log4j.
  */
-public class SLF4JLogger implements LocationAwareLogger, Serializable {
+public class Log4j2Logger implements LocationAwareLogger, Serializable {
 
-    public static final String FQCN = SLF4JLogger.class.getName();
+    public static final String FQCN = Log4j2Logger.class.getName();
     
     private static final long serialVersionUID = 7869000638091304316L;
     private static final Marker EVENT_MARKER = MarkerFactory.getMarker("EVENT");
@@ -46,7 +45,7 @@ public class SLF4JLogger implements Loca
     private final String name;
     private transient EventDataConverter converter;
 
-    public SLF4JLogger(final LoggerProvider logger, final String name) {
+    public Log4j2Logger(final LoggerProvider logger, final String name) {
         this.logger = logger;
         this.eventLogger = "EventLogger".equals(name);
         this.name = name;

Copied: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jLoggerFactory.java
(from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jLoggerFactory.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jLoggerFactory.java?p2=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jLoggerFactory.java&p1=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jLoggerFactory.java&r1=1583058&r2=1583065&rev=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jLoggerFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jLoggerFactory.java
Sat Mar 29 21:51:38 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.slf4j.helpers;
+package org.apache.logging.slf4j;
 
 import java.util.Map;
 import java.util.WeakHashMap;
@@ -27,7 +27,6 @@ import org.apache.logging.log4j.spi.Logg
 import org.slf4j.ILoggerFactory;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.slf4j.impl.SLF4JLogger;
 
 /**
  *
@@ -49,7 +48,7 @@ public class Log4jLoggerFactory implemen
             return loggers.get(name);
         }
         final String key = Logger.ROOT_LOGGER_NAME.equals(name) ? LogManager.ROOT_LOGGER_NAME
: name;
-        loggers.putIfAbsent(name, new SLF4JLogger(context.getLogger(key), name));
+        loggers.putIfAbsent(name, new Log4j2Logger(context.getLogger(key), name));
         return loggers.get(name);
     }
 

Copied: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMDCAdapter.java
(from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMDCAdapter.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMDCAdapter.java?p2=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMDCAdapter.java&p1=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMDCAdapter.java&r1=1583058&r2=1583065&rev=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMDCAdapter.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMDCAdapter.java
Sat Mar 29 21:51:38 2014
@@ -14,7 +14,7 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.slf4j.helpers;
+package org.apache.logging.slf4j;
 
 import java.util.Map;
 

Copied: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarkerFactory.java
(from r1583058, logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMarkerFactory.java)
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarkerFactory.java?p2=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarkerFactory.java&p1=logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMarkerFactory.java&r1=1583058&r2=1583065&rev=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/helpers/Log4jMarkerFactory.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/apache/logging/slf4j/Log4jMarkerFactory.java
Sat Mar 29 21:51:38 2014
@@ -14,13 +14,14 @@
  * See the license for the specific language governing permissions and
  * limitations under the license.
  */
-package org.slf4j.helpers;
+package org.apache.logging.slf4j;
 
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 import org.slf4j.IMarkerFactory;
 import org.slf4j.Marker;
+import org.slf4j.helpers.MarkerWrapper;
 
 /**
  *

Modified: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java?rev=1583065&r1=1583064&r2=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
Sat Mar 29 21:51:38 2014
@@ -17,11 +17,12 @@
 package org.slf4j.impl;
 
 import org.slf4j.ILoggerFactory;
-import org.slf4j.helpers.Log4jLoggerFactory;
+import org.apache.logging.slf4j.Log4jLoggerFactory;
 import org.slf4j.spi.LoggerFactoryBinder;
 
 /**
- *
+ * SLF4J LoggerFactoryBinder implementation using Log4j. This class is part of the required
classes used to specify an
+ * SLF4J logger provider implementation.
  */
 public final class StaticLoggerBinder implements LoggerFactoryBinder {
 

Modified: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMDCBinder.java?rev=1583065&r1=1583064&r2=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMDCBinder.java
Sat Mar 29 21:51:38 2014
@@ -16,7 +16,7 @@
  */
 package org.slf4j.impl;
 
-import org.slf4j.helpers.Log4jMDCAdapter;
+import org.apache.logging.slf4j.Log4jMDCAdapter;
 import org.slf4j.spi.MDCAdapter;
 
 /**

Modified: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java?rev=1583065&r1=1583064&r2=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/main/java/org/slf4j/impl/StaticMarkerBinder.java
Sat Mar 29 21:51:38 2014
@@ -17,11 +17,12 @@
 package org.slf4j.impl;
 
 import org.slf4j.IMarkerFactory;
-import org.slf4j.helpers.Log4jMarkerFactory;
+import org.apache.logging.slf4j.Log4jMarkerFactory;
 import org.slf4j.spi.MarkerFactoryBinder;
 
 /**
- *
+ * SLF4J MarkerFactoryBinder implementation using Log4j. This class is part of the required
classes used to specify an
+ * SLF4J logging provider implementation.
  */
 public class StaticMarkerBinder implements MarkerFactoryBinder {
 

Modified: logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java?rev=1583065&r1=1583064&r2=1583065&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-slf4j-impl/src/test/java/org/apache/logging/slf4j/LoggerTest.java
Sat Mar 29 21:51:38 2014
@@ -42,7 +42,6 @@ import org.slf4j.ext.EventData;
 import org.slf4j.ext.EventLogger;
 import org.slf4j.ext.XLogger;
 import org.slf4j.ext.XLoggerFactory;
-import org.slf4j.impl.SLF4JLogger;
 import org.slf4j.spi.LocationAwareLogger;
 
 /**
@@ -114,7 +113,7 @@ public class LoggerTest {
         verify("List", "o.a.l.s.LoggerTest Debug message {} MDC{}" + Constants.LINE_SEP);
         logger.debug("Debug message {}", (Object[]) null);
         verify("List", "o.a.l.s.LoggerTest Debug message {} MDC{}" + Constants.LINE_SEP);
-        ((LocationAwareLogger)logger).log(null, SLF4JLogger.class.getName(), LocationAwareLogger.DEBUG_INT,
+        ((LocationAwareLogger)logger).log(null, Log4j2Logger.class.getName(), LocationAwareLogger.DEBUG_INT,
             "Debug message {}", null, null);
         verify("List", "o.a.l.s.LoggerTest Debug message {} MDC{}" + Constants.LINE_SEP);
     }



Mime
View raw message