Skip to content

Commit

Permalink
- Adding version check support in each slf4j-binding
Browse files Browse the repository at this point in the history
  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
  • Loading branch information
ceki committed Oct 2, 2008
1 parent c9a8e91 commit 7acc6e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions goVersion.sh
Original file line number Diff line number Diff line change
@@ -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}

2 changes: 1 addition & 1 deletion slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public final class LoggerFactory {
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() {
Expand Down
2 changes: 1 addition & 1 deletion slf4j-ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 7acc6e1

Please sign in to comment.