[slf4j-dev] svn commit: r1167 - in slf4j/trunk: . slf4j-api/src/main/java/org/slf4j slf4j-ext

ceki at slf4j.org ceki at slf4j.org
Thu Oct 2 20:44:12 CEST 2008


Author: ceki
Date: Thu Oct  2 20:44:12 2008
New Revision: 1167

Modified:
   slf4j/trunk/goVersion.sh
   slf4j/trunk/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
   slf4j/trunk/slf4j-ext/pom.xml

Log:
- Adding version check support in each slf4j-binding 
  Each copy of StaticLoggerBinder.java found in each binding now contains a field called
  VERSION. LoggerFactory checks that the version value found in the binding matches
  the expected version number as declared in LoggerFactory

Modified: slf4j/trunk/goVersion.sh
==============================================================================
--- slf4j/trunk/goVersion.sh	(original)
+++ slf4j/trunk/goVersion.sh	Thu Oct  2 20:44:12 2008
@@ -1,8 +1,11 @@
 
 
+
 VER=$1
 echo "Will use version '${VER}'"
 echo "Changing pom.xml files"
-find . -name "pom.xml" |grep -v archetype-resources|xargs perl version.pl ${VER}
+find . -name "pom.xml" |xargs perl version.pl ${VER}
 echo "Changing Java files"
-find . -name "StaticLoggerBinder.java" |grep -v archetype-resources|xargs perl binderVersion.pl ${VER}
+find . -name "StaticLoggerBinder.java" |xargs perl binderVersion.pl ${VER}
+find slf4j-api -name "LoggerFactory.java" |xargs perl binderVersion.pl ${VER}
+

Modified: slf4j/trunk/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
==============================================================================
--- slf4j/trunk/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java	(original)
+++ slf4j/trunk/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java	Thu Oct  2 20:44:12 2008
@@ -51,7 +51,7 @@
   static final String NULL_LF_URL = "http://www.slf4j.org/codes.html#null_LF";
   static final String VERSION_MISMATCH = "http://www.slf4j.org/codes.html#version_mismatch";
   
-  static private final String EXPECTED_VERSION = "";
+  static private final String EXPECTED_VERSION = "1.5.4-SNAPSHOT";
    
   // private constructor prevents instantiation
   private LoggerFactory() {

Modified: slf4j/trunk/slf4j-ext/pom.xml
==============================================================================
--- slf4j/trunk/slf4j-ext/pom.xml	(original)
+++ slf4j/trunk/slf4j-ext/pom.xml	Thu Oct  2 20:44:12 2008
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.slf4j</groupId>
     <artifactId>slf4j-parent</artifactId>
-    <version>1.5.4-SNAPSHOT
</version>
+    <version>1.5.4-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>



More information about the slf4j-dev mailing list