[slf4j-dev] [GIT] SLF4J: Simple Logging Facade for Java branch, master, updated. v_1.6.1-42-g67f86a6

added by portage for gitosis-gentoo git-noreply at pixie.qos.ch
Mon Aug 15 19:37:50 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  67f86a636d4f8b01d7ab324b8206602c47907473 (commit)
      from  ced19dedec4206252d911b9c947c439117ee6702 (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=67f86a636d4f8b01d7ab324b8206602c47907473
http://github.com/ceki/slf4j/commit/67f86a636d4f8b01d7ab324b8206602c47907473

commit 67f86a636d4f8b01d7ab324b8206602c47907473
Author: Ceki Gulcu <ceki at qos.ch>
Date:   Mon Aug 15 19:37:08 2011 +0200

    fixing #228

diff --git a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
index 49e97fe..82fc6af 100644
--- a/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
@@ -112,6 +112,19 @@ public final class LoggerFactory {
     }
   }
 
+  private static boolean messageContainsOrgSlf4jImplStaticLoggerBinder(String msg) {
+      if(msg == null)
+          return false;
+
+      if(msg.indexOf("org/slf4j/impl/StaticLoggerBinder") != -1)
+          return true;
+
+      if(msg.indexOf("org.slf4j.impl.StaticLoggerBinder") != -1)
+           return true;
+
+      return false;
+  }
+
   private final static void bind() {
     try {
       // the next line does the binding
@@ -120,7 +133,7 @@ public final class LoggerFactory {
       emitSubstituteLoggerWarning();
     } catch (NoClassDefFoundError ncde) {
       String msg = ncde.getMessage();
-      if (msg != null && msg.indexOf("org/slf4j/impl/StaticLoggerBinder") != -1) {
+      if (messageContainsOrgSlf4jImplStaticLoggerBinder(msg)) {
         INITIALIZATION_STATE = NOP_FALLBACK_INITILIZATION;
         Util
             .report("Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".");
@@ -194,8 +207,8 @@ public final class LoggerFactory {
     }
   }
 
-  // We need to use the name of the StaticLoggerBinder class, we can't reference
-  // the class itseld.
+  // We need to use the name of the StaticLoggerBinder class, but we can't reference
+  // the class itself.
   private static String STATIC_LOGGER_BINDER_PATH = "org/slf4j/impl/StaticLoggerBinder.class";
 
   private static void singleImplementationSanityCheck() {

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

Summary of changes:
 .../src/main/java/org/slf4j/LoggerFactory.java     |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)


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


More information about the slf4j-dev mailing list