[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch master updated. v_1.6.2-7-g393d889

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Sun Oct 16 23:07:01 CEST 2011


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  393d8899a64ae7562afe44105b7938b0fd9218a9 (commit)
      from  054ed393bd95a6f7c34398accc5cefe36fae8989 (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=393d8899a64ae7562afe44105b7938b0fd9218a9
http://github.com/ceki/slf4j/commit/393d8899a64ae7562afe44105b7938b0fd9218a9

commit 393d8899a64ae7562afe44105b7938b0fd9218a9
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Sun Oct 16 23:06:52 2011 +0200

    fix bug #235

diff --git a/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java b/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java
index 876df39..2fd6ccf 100644
--- a/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java
+++ b/log4j-over-slf4j/src/main/java/org/apache/log4j/Category.java
@@ -16,11 +16,14 @@
 
 package org.apache.log4j;
 
+import org.apache.log4j.helpers.NullEnumeration;
 import org.slf4j.LoggerFactory;
 import org.slf4j.Marker;
 import org.slf4j.MarkerFactory;
 import org.slf4j.spi.LocationAwareLogger;
 
+import java.util.Enumeration;
+
 /**
  * <p>
  * This class is a minimal implementation of the original
@@ -64,6 +67,7 @@ public class Category {
     return Log4jLoggerFactory.getLogger(name);
   }
 
+
   /**
    * Returns the obvious.
    *
@@ -73,6 +77,10 @@ public class Category {
     return name;
   }
 
+  public Enumeration getAllAppenders() {
+    return NullEnumeration.getInstance();
+  }
+
   /**
    * Return the level in effect for this category/logger.
    *
diff --git a/log4j-over-slf4j/src/main/java/org/apache/log4j/helpers/NullEnumeration.java b/log4j-over-slf4j/src/main/java/org/apache/log4j/helpers/NullEnumeration.java
new file mode 100644
index 0000000..ff0a9d4
--- /dev/null
+++ b/log4j-over-slf4j/src/main/java/org/apache/log4j/helpers/NullEnumeration.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.log4j.helpers;
+
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+/**
+ * An always-empty Enumerator.
+ *
+ * @author Anders Kristensen
+ * @since version 1.0
+ */
+public class NullEnumeration implements Enumeration {
+  private static final NullEnumeration instance = new NullEnumeration();
+
+  private NullEnumeration() {
+  }
+
+  public static NullEnumeration getInstance() {
+    return instance;
+  }
+
+  public boolean hasMoreElements() {
+    return false;
+  }
+
+  public Object nextElement() {
+    throw new NoSuchElementException();
+  }
+}
\ No newline at end of file
diff --git a/slf4j-site/src/site/pages/news.html b/slf4j-site/src/site/pages/news.html
index 99ddd76..8a14cb9 100644
--- a/slf4j-site/src/site/pages/news.html
+++ b/slf4j-site/src/site/pages/news.html
@@ -38,6 +38,13 @@
    reported by Ralph Goers.
    </p>
 
+   <p>In the log4j-over-slf4j module, added missing
+   <code>getAllAppenders</code>() method in <code>Category</code>
+   class. This fixes <a
+   href="http://bugzilla.slf4j.org/show_bug.cgi?id=235">bug #235</a>
+   reported by Anthony Whitford.
+   </p>
+
    <h3>August 19th, 2011 - Release of SLF4J 1.6.2</h3>
 
    <p>Fixed <a

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

Summary of changes:
 .../src/main/java/org/apache/log4j/Category.java   |    8 +++
 .../org/apache/log4j/helpers/NullEnumeration.java  |   46 ++++++++++++++++++++
 slf4j-site/src/site/pages/news.html                |    7 +++
 3 files changed, 61 insertions(+), 0 deletions(-)
 create mode 100644 log4j-over-slf4j/src/main/java/org/apache/log4j/helpers/NullEnumeration.java


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


More information about the slf4j-dev mailing list