switch to slf4j

This commit is contained in:
Hannes Janetzek
2013-10-08 22:02:14 +02:00
parent 1cf2ea60a7
commit 2d18e7d25f
79 changed files with 418 additions and 526 deletions

View File

@@ -34,49 +34,41 @@ public class MyAttributes implements Attributes {
@Override
public String getURI(int paramInt) {
Log.d("..", "missing");
return null;
}
@Override
public String getQName(int paramInt) {
Log.d("..", "missing");
return null;
}
@Override
public String getType(int paramInt) {
Log.d("..", "missing");
return null;
}
@Override
public int getIndex(String paramString1, String paramString2) {
Log.d("..", "missing");
return 0;
}
@Override
public int getIndex(String paramString) {
Log.d("..", "missing");
return 0;
}
@Override
public String getType(String paramString1, String paramString2) {
Log.d("..", "missing");
return null;
}
@Override
public String getType(String paramString) {
Log.d("..", "missing");
return null;
}
@Override
public String getValue(String paramString1, String paramString2) {
Log.d("..", "missing");
return null;
}

View File

@@ -3,7 +3,6 @@ package org.oscim.backend;
import java.io.IOException;
import java.io.InputStream;
import org.oscim.backend.Log;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
@@ -14,7 +13,6 @@ import com.google.gwt.xml.client.XMLParser;
public class MyXMLReader {
public void parse(InputStream is) throws SAXException {
Log.d("..", "read theme");
StringBuilder sb = new StringBuilder();
byte[] buf = new byte[8192];
int read;

View File

@@ -14,7 +14,8 @@
*/
package org.oscim.layers.tile.vector;
import org.oscim.backend.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.oscim.core.GeometryBuffer.GeometryType;
import org.oscim.core.MapElement;
import org.oscim.core.MercatorProjection;
@@ -49,7 +50,7 @@ import org.oscim.utils.LineClipper;
public class VectorTileLoader extends TileLoader implements IRenderTheme.Callback, ITileDataSink {
private static final String TAG = VectorTileLoader.class.getName();
static final Logger log = LoggerFactory.getLogger(VectorTileLoader.class);
private static final double STROKE_INCREASE = Math.sqrt(2.5);
private static final byte LAYERS = 11;
@@ -230,7 +231,7 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
}
//private void debugUnmatched(boolean closed, TagSet tags) {
// Log.d(TAG, "DBG way not matched: " + closed + " "
// log.debug("DBG way not matched: " + closed + " "
// + Arrays.deepToString(tags));
//
// mTagName = new Tag("name", tags[0].key + ":"
@@ -268,7 +269,7 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
if (line.stipple == 0) {
if (line.outline && mCurLineLayer == null) {
Log.e(TAG, "BUG in theme: line must come before outline!");
log.error("BUG in theme: line must come before outline!");
return;
}
@@ -378,7 +379,7 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
@Override
public void renderPointSymbol(Symbol symbol) {
if (symbol.texture == null) {
Log.d(TAG, "missing symbol for " + mElement.tags.toString());
log.debug("missing symbol for " + mElement.tags.toString());
return;
}
for (int i = 0, n = mElement.getNumPoints(); i < n; i++) {

View File

@@ -27,7 +27,7 @@ import com.google.gwt.xhr.client.XMLHttpRequest;
import com.google.gwt.xhr.client.XMLHttpRequest.ResponseType;
public class LwHttp {
//private static final String TAG = LwHttp.class.getName();
//static final Logger log = LoggerFactory.getLogger(LwHttp.class);
private final String mUrlFileExtension;
private final String mUrlPath;
@@ -107,7 +107,7 @@ public class LwHttp {
@Override
public void onReadyStateChange(XMLHttpRequest xhr) {
int state = xhr.getReadyState();
//Log.d(TAG, mCurrentUrl + "response " + status + "/" + state);
//log.debug(mCurrentUrl + "response " + status + "/" + state);
if (state == XMLHttpRequest.DONE) {

View File

@@ -17,7 +17,8 @@ package org.oscim.tiling.source.common;
import java.io.IOException;
import java.io.InputStream;
import org.oscim.backend.Log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.oscim.tiling.MapTile;
import org.oscim.tiling.source.ITileDataSink;
import org.oscim.tiling.source.ITileDataSource;
@@ -27,7 +28,7 @@ import org.oscim.tiling.source.ITileDataSource;
*
*/
public abstract class PbfTileDataSource implements ITileDataSource {
private static final String TAG = PbfTileDataSource.class.getName();
static final Logger log = LoggerFactory.getLogger(PbfTileDataSource.class);
protected LwHttp mConn;
protected final PbfDecoder mTileDecoder;
@@ -65,7 +66,7 @@ public abstract class PbfTileDataSource implements ITileDataSource {
}
}
if (!win)
Log.d(TAG, mTile + " failed");
log.debug(mTile + " failed");
mConn.requestCompleted();
mSink.completed(win);

View File

@@ -20,8 +20,6 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.logging.Level;
import org.oscim.backend.Log;
/**
* A utility class with IO-specific helper methods.
*/
@@ -41,7 +39,7 @@ public final class IOUtils {
closeable.close();
}
} catch (IOException e) {
Log.d(IOUtils.class.getName(), e.getMessage() + " " + e);
//log.debug(e.getMessage() + " " + e);
}
}
@@ -51,7 +49,7 @@ public final class IOUtils {
closeable.close();
}
} catch (IOException e) {
Log.d(IOUtils.class.getName(), e.getMessage() + " " + e);
//log.debug(e.getMessage() + " " + e);
}
}

View File

@@ -1,6 +1,5 @@
package org.oscim.utils;
import org.oscim.backend.Log;
import org.oscim.core.GeometryBuffer;
import org.oscim.renderer.elements.VertexItem;
@@ -29,18 +28,18 @@ public class Tessellator {
//Int32Array io = getIndices(o);
if (io == null) {
Log.d("Triangulator", "building tessellation failed");
//log.debug("building tessellation failed");
return 0;
}
// if (vo.length() != plen) {
// // TODO handle different output points
// Log.d("", "other points out" + plen + ":" + vo.length() + ", " + io.length());
// log.debug(" + io.length());
//
// //for (int i = 0; i < vo.length(); i += 2)
// // Log.d("<", vo.get(i) + " " + vo.get(i + 1));
// // log.debug(vo.get(i) + " " + vo.get(i + 1));
// //for (int i = ppos; i < ppos + plen; i += 2)
// // Log.d(">", points[i]+ " " + points[i + 1]);
// // log.debug( points[i]+ " " + points[i + 1]);
//
// return 0;
// }