[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch, master, updated. v1.6.0-RC0-3-g0116ae5

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Fri Apr 30 15:11:21 CEST 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "SLF4J: Simple Logging Facade for Java".

The branch, master has been updated
       via  0116ae54455c37d47dc44dcbbcfa6d44248b1233 (commit)
      from  38795c7a416055ecabd6dd6a74304018b7ffb15a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=0116ae54455c37d47dc44dcbbcfa6d44248b1233
http://github.com/ceki/slf4j/commit/0116ae54455c37d47dc44dcbbcfa6d44248b1233

commit 0116ae54455c37d47dc44dcbbcfa6d44248b1233
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Fri Apr 30 15:09:27 2010 +0200

    Fixed bugs 179 to 181 reported by Sebastian Davids

diff --git a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLog.java b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLog.java
index cf1dedd..44708bb 100644
--- a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLog.java
+++ b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLog.java
@@ -24,11 +24,12 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Implementation of {@link Log org.apache.commons.logging.Log} interface which 
- * delegates all processing to a wrapped {@link Logger org.slf4j.Logger} instance.
+ * Implementation of {@link Log org.apache.commons.logging.Log} interface which
+ * delegates all processing to a wrapped {@link Logger org.slf4j.Logger}
+ * instance.
  * 
- * <p>JCL's FATAL and TRACE levels are mapped to ERROR and DEBUG respectively. All 
- * other levels map one to one.
+ * <p>
+ * JCL's FATAL level is mapped to ERROR. All other levels map one to one.
  * 
  * @author Ceki G&uuml;lc&uuml;
  */
@@ -36,10 +37,10 @@ public class SLF4JLog implements Log, Serializable {
 
   private static final long serialVersionUID = 680728617011167209L;
 
-  //used to store this logger's name to recreate it after serialization
+  // used to store this logger's name to recreate it after serialization
   protected String name;
 
-  // in both Log4jLogger and Jdk14Logger classes in the original JCL, the 
+  // in both Log4jLogger and Jdk14Logger classes in the original JCL, the
   // logger instance is transient
   private transient Logger logger;
 
@@ -93,128 +94,144 @@ public class SLF4JLog implements Log, Serializable {
   }
 
   /**
-   * Converts the input parameter to String and then delegates to 
-   * the debug method of the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the input parameter to String and then delegates to the debug
+   * method of the wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
+   * @param message
+   *          the message to log. Converted to {@link String}
    */
   public void trace(Object message) {
     logger.trace(String.valueOf(message));
   }
 
   /**
-   * Converts the first input parameter to String and then delegates to 
-   * the debug method of the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the first input parameter to String and then delegates to the
+   * debug method of the wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
-   * @param t the exception to log
+   * @param message
+   *          the message to log. Converted to {@link String}
+   * @param t
+   *          the exception to log
    */
   public void trace(Object message, Throwable t) {
     logger.trace(String.valueOf(message), t);
   }
 
   /**
-   * Converts the input parameter to String and then delegates to the wrapped 
+   * Converts the input parameter to String and then delegates to the wrapped
    * <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String} 
+   * @param message
+   *          the message to log. Converted to {@link String}
    */
   public void debug(Object message) {
     logger.debug(String.valueOf(message));
   }
 
   /**
-   * Converts the first input parameter to String and then delegates to 
-   * the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the first input parameter to String and then delegates to the
+   * wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
-   * @param t the exception to log
+   * @param message
+   *          the message to log. Converted to {@link String}
+   * @param t
+   *          the exception to log
    */
   public void debug(Object message, Throwable t) {
     logger.debug(String.valueOf(message), t);
   }
 
   /**
-   * Converts the input parameter to String and then delegates to the wrapped 
+   * Converts the input parameter to String and then delegates to the wrapped
    * <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String} 
+   * @param message
+   *          the message to log. Converted to {@link String}
    */
   public void info(Object message) {
     logger.info(String.valueOf(message));
   }
 
   /**
-   * Converts the first input parameter to String and then delegates to 
-   * the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the first input parameter to String and then delegates to the
+   * wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
-   * @param t the exception to log
+   * @param message
+   *          the message to log. Converted to {@link String}
+   * @param t
+   *          the exception to log
    */
   public void info(Object message, Throwable t) {
     logger.info(String.valueOf(message), t);
   }
 
   /**
-   * Converts the input parameter to String and then delegates to the wrapped 
+   * Converts the input parameter to String and then delegates to the wrapped
    * <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
+   * @param message
+   *          the message to log. Converted to {@link String}
    */
   public void warn(Object message) {
     logger.warn(String.valueOf(message));
   }
 
   /**
-   * Converts the first input parameter to String and then delegates to 
-   * the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the first input parameter to String and then delegates to the
+   * wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
-   * @param t the exception to log
+   * @param message
+   *          the message to log. Converted to {@link String}
+   * @param t
+   *          the exception to log
    */
   public void warn(Object message, Throwable t) {
     logger.warn(String.valueOf(message), t);
   }
 
   /**
-   * Converts the input parameter to String and then delegates to the wrapped 
+   * Converts the input parameter to String and then delegates to the wrapped
    * <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
+   * @param message
+   *          the message to log. Converted to {@link String}
    */
   public void error(Object message) {
     logger.error(String.valueOf(message));
   }
 
   /**
-   * Converts the first input parameter to String and then delegates to 
-   * the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the first input parameter to String and then delegates to the
+   * wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
-   * @param t the exception to log
+   * @param message
+   *          the message to log. Converted to {@link String}
+   * @param t
+   *          the exception to log
    */
   public void error(Object message, Throwable t) {
     logger.error(String.valueOf(message), t);
   }
 
-
- 
   /**
-   * Converts the input parameter to String and then delegates to 
-   * the error method of the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the input parameter to String and then delegates to the error
+   * method of the wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
+   * @param message
+   *          the message to log. Converted to {@link String}
    */
   public void fatal(Object message) {
     logger.error(String.valueOf(message));
   }
 
   /**
-   * Converts the first input parameter to String and then delegates to 
-   * the error method of the wrapped <code>org.slf4j.Logger</code> instance.
+   * Converts the first input parameter to String and then delegates to the
+   * error method of the wrapped <code>org.slf4j.Logger</code> instance.
    * 
-   * @param message the message to log. Converted to {@link String}  
-   * @param t the exception to log
+   * @param message
+   *          the message to log. Converted to {@link String}
+   * @param t
+   *          the exception to log
    */
   public void fatal(Object message, Throwable t) {
     logger.error(String.valueOf(message), t);
diff --git a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLogFactory.java b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLogFactory.java
index a6e2e76..8a31118 100644
--- a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLogFactory.java
+++ b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/impl/SLF4JLogFactory.java
@@ -16,11 +16,12 @@
 
 package org.apache.commons.logging.impl;
 
+import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Hashtable;
+import java.util.List;
 import java.util.Map;
-import java.util.Vector;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogConfigurationException;
@@ -103,14 +104,14 @@ public class SLF4JLogFactory extends LogFactory {
    */
   public String[] getAttributeNames() {
 
-    Vector names = new Vector();
+    List names = new ArrayList();
     Enumeration keys = attributes.keys();
     while (keys.hasMoreElements()) {
-      names.addElement((String) keys.nextElement());
+      names.add((String) keys.nextElement());
     }
     String results[] = new String[names.size()];
     for (int i = 0; i < results.length; i++) {
-      results[i] = (String) names.elementAt(i);
+      results[i] = (String) names.get(i);
     }
     return (results);
 
@@ -149,7 +150,7 @@ public class SLF4JLogFactory extends LogFactory {
   public Log getInstance(String name) throws LogConfigurationException {
     Log instance = null;
     // protect against concurrent access of loggerMap
-    synchronized (this) {
+    synchronized (loggerMap) {
       instance = (Log) loggerMap.get(name);
       if (instance == null) {
         Logger logger = LoggerFactory.getLogger(name);
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html
index 8d6659f..2f71283 100644
--- a/slf4j-site/src/site/pages/news.html
+++ b/slf4j-site/src/site/pages/news.html
@@ -29,7 +29,7 @@
 
    <hr noshade="noshade" size="1"/>
 
-   <h3>April 26th, 2010 - Release of SLF4J 1.6.0-alpha2</h3>
+   <h3>May xth, 2010 - Release of SLF4J 1.6.0-alpha3</h3>
 
    <p>It is expected that <em>all</em> SLF4J releases in the 1.6.x and
    2.0.x series will be mutually compatible. Note that the 2.0.x
@@ -86,7 +86,20 @@
    observed when SLF4J artifacts were placed under
    java.endorsed.dirs.</p>
 
+   <p>Fixed sub-optimal list type usage in
+   <code>SLF4JLogFactory</code> as reported in <a
+   href="http://bugzilla.slf4j.org/show_bug.cgi?id=179">bug 179</a> by
+   Sebastian Davids.
+   </p>
+
+
+   <p>Fixed documentation inconsistency in <code>SLF4JLog</code> as
+   reported in <a
+   href="http://bugzilla.slf4j.org/show_bug.cgi?id=180">bug 180</a> by
+   Sebastian Davids.
+   </p>
 
+   
    <hr noshade="noshade" size="1"/>
 
    <h3>February 25th, 2010 - Release of SLF4J 1.5.11</h3>

-----------------------------------------------------------------------

Summary of changes:
 .../org/apache/commons/logging/impl/SLF4JLog.java  |  109 +++++++++++--------
 .../commons/logging/impl/SLF4JLogFactory.java      |   11 +-
 slf4j-site/src/site/pages/news.html                |   15 +++-
 3 files changed, 83 insertions(+), 52 deletions(-)


hooks/post-receive
-- 
SLF4J: Simple Logging Facade for Java


More information about the slf4j-dev mailing list