Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-3795 removed SLF4J dependency by logging to java.util.logging instead

David Wayne Smileya29ad6dae969
diff --git a/dev-tools/maven/modules/spatial/pom.xml.template b/dev-tools/maven/modules/spatial/pom.xml.template
index 2069f7ac5e8..52fd534ff20 100644
--- a/dev-tools/maven/modules/spatial/pom.xml.template
+++ b/dev-tools/maven/modules/spatial/pom.xml.template
@@ -49,10 +49,6 @@
<groupId>com.spatial4j</groupId>
<artifactId>spatial4j</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>lucene-core</artifactId>
@@ -68,12 +64,6 @@
<artifactId>lucene-analyzers-common</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>lucene-benchmark</artifactId>
- <version>${project.version}</version>
- <optional>true</optional>
- </dependency>
</dependencies>
<build>
<directory>${build-directory}</directory>
diff --git a/modules/spatial/lib/slf4j-LICENSE-BSD_LIKE.txt b/modules/spatial/lib/slf4j-LICENSE-BSD_LIKE.txt
deleted file mode 100644
index f5ecafa0074..00000000000
--- a/modules/spatial/lib/slf4j-LICENSE-BSD_LIKE.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/modules/spatial/lib/slf4j-NOTICE.txt b/modules/spatial/lib/slf4j-NOTICE.txt
deleted file mode 100644
index cf438946ad9..00000000000
--- a/modules/spatial/lib/slf4j-NOTICE.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-=========================================================================
-== SLF4J Notice -- http://www.slf4j.org/license.html ==
-=========================================================================
-
-Copyright (c) 2004-2008 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/modules/spatial/lib/slf4j-api-1.6.1.jar b/modules/spatial/lib/slf4j-api-1.6.1.jar
deleted file mode 100644
index 46d734aa603..00000000000
--- a/modules/spatial/lib/slf4j-api-1.6.1.jar
+++ /dev/null
@@ -1,2 +0,0 @@
-AnyObjectId[42e0ad0de7773da9b94b12f503deda7f5a506015] was removed in git history.
-Apache SVN contains full history.
\ No newline at end of file
diff --git a/modules/spatial/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java b/modules/spatial/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java
index 7f0c4e1aff5..1eff3c3be46 100644
--- a/modules/spatial/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java
+++ b/modules/spatial/src/java/org/apache/lucene/spatial/util/ShapeFieldCacheProvider.java
@@ -21,15 +21,13 @@ import com.spatial4j.core.shape.Shape;
import org.apache.lucene.index.*;
import org.apache.lucene.search.DocIdSetIterator;
import org.apache.lucene.util.BytesRef;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.WeakHashMap;
-
+import java.util.logging.Logger;
public abstract class ShapeFieldCacheProvider<T extends Shape> {
- static final Logger log = LoggerFactory.getLogger(ShapeFieldCacheProvider.class);
+ private Logger log = Logger.getLogger(getClass().getName());
// it may be a List<T> or T
WeakHashMap<IndexReader, ShapeFieldCache<T>> sidx = new WeakHashMap<IndexReader, ShapeFieldCache<T>>();
@@ -51,7 +49,7 @@ public abstract class ShapeFieldCacheProvider<T extends Shape> {
}
long startTime = System.currentTimeMillis();
- log.info("Building Cache [" + reader.maxDoc() + "]");
+ log.fine("Building Cache [" + reader.maxDoc() + "]");
idx = new ShapeFieldCache<T>(reader.maxDoc(),defaultSize);
int count = 0;
DocsEnum docs = null;
@@ -76,7 +74,7 @@ public abstract class ShapeFieldCacheProvider<T extends Shape> {
}
sidx.put(reader, idx);
long elapsed = System.currentTimeMillis() - startTime;
- log.info("Cached: [" + count + " in " + elapsed + "ms] " + idx);
+ log.fine("Cached: [" + count + " in " + elapsed + "ms] " + idx);
return idx;
}
}
diff --git a/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java b/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java
index 1b2ec51cbf3..151483b2d44 100644
--- a/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java
+++ b/modules/spatial/src/java/org/apache/lucene/spatial/vector/TwoDoublesStrategy.java
@@ -37,14 +37,9 @@ import org.apache.lucene.spatial.SpatialStrategy;
import org.apache.lucene.spatial.util.CachingDoubleValueSource;
import org.apache.lucene.spatial.util.NumericFieldInfo;
import org.apache.lucene.spatial.util.ValueSourceFilter;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
public class TwoDoublesStrategy extends SpatialStrategy<TwoDoublesFieldInfo> {
- static final Logger log = LoggerFactory.getLogger(TwoDoublesStrategy.class);
-
private final NumericFieldInfo finfo;
private final DoubleParser parser;
diff --git a/modules/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java b/modules/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java
index a0248dc68c4..6b6833b5697 100644
--- a/modules/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java
+++ b/modules/spatial/src/test/org/apache/lucene/spatial/StrategyTestCase.java
@@ -28,12 +28,11 @@ import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.StringField;
import org.apache.lucene.index.IndexableField;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
+import java.util.logging.Logger;
public abstract class StrategyTestCase<T extends SpatialFieldInfo> extends SpatialTestCase {
@@ -48,7 +47,7 @@ public abstract class StrategyTestCase<T extends SpatialFieldInfo> extends Spati
public static final String QTEST_Cities_IsWithin_BBox = "cities-IsWithin-BBox.txt";
- protected final Logger log = LoggerFactory.getLogger(getClass());
+ private Logger log = Logger.getLogger(getClass().getName());
protected final SpatialArgsParser argsParser = new SpatialArgsParser();