switch to slf4j
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along with
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.oscim.android;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
public class AndroidLog implements org.oscim.backend.Log.Logger {
|
||||
|
||||
@Override
|
||||
public void d(String tag, String msg) {
|
||||
Log.d(tag, msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void w(String tag, String msg) {
|
||||
Log.w(tag, msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void e(String tag, String msg) {
|
||||
Log.e(tag, msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void i(String tag, String msg) {
|
||||
Log.i(tag, msg);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,14 +5,12 @@ import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
import org.oscim.backend.Log;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class GlConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
||||
static private final String TAG = "ConfigChooser";
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -78,7 +76,7 @@ public class GlConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
||||
// You need to explicitly filter the data returned by eglChooseConfig!
|
||||
|
||||
// for (int i = 0; i < configs.length; ++i) {
|
||||
// Log.i(TAG, printConfig(egl, display, configs[i]));
|
||||
// log.info(configs[i]));
|
||||
// }
|
||||
|
||||
// int index = -1;
|
||||
@@ -100,12 +98,12 @@ public class GlConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
||||
// }
|
||||
// }
|
||||
// if (index == -1) {
|
||||
// Log.w(TAG, "Did not find sane config, using first");
|
||||
// log.warn(using first");
|
||||
// index = 0;
|
||||
// }
|
||||
int index = 0;
|
||||
|
||||
Log.i(TAG, "using: " + printConfig(egl, display, configs[index]));
|
||||
//log.info(configs[index]);
|
||||
|
||||
EGLConfig config = configs.length > 0 ? configs[index] : null;
|
||||
if (config == null) {
|
||||
|
||||
@@ -21,9 +21,10 @@ import org.oscim.android.input.AndroidMotionEvent;
|
||||
import org.oscim.backend.AssetAdapter;
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.GLAdapter;
|
||||
import org.oscim.backend.Log;
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.map.Map;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
@@ -37,7 +38,7 @@ import android.widget.RelativeLayout;
|
||||
*/
|
||||
public class MapView extends RelativeLayout {
|
||||
|
||||
final static String TAG = MapView.class.getName();
|
||||
static final Logger log = LoggerFactory.getLogger(MapView.class);
|
||||
|
||||
public static final boolean debugFrameTime = false;
|
||||
public static final boolean testRegionZoom = false;
|
||||
@@ -91,7 +92,7 @@ public class MapView extends RelativeLayout {
|
||||
"context is not an instance of MapActivity");
|
||||
}
|
||||
|
||||
Log.logger = new AndroidLog();
|
||||
//Log.logger = new AndroidLog();
|
||||
CanvasAdapter.g = AndroidGraphics.INSTANCE;
|
||||
AssetAdapter.g = new AndroidAssetAdapter(context);
|
||||
GLAdapter.g = new AndroidGL();
|
||||
@@ -198,7 +199,7 @@ public class MapView extends RelativeLayout {
|
||||
}
|
||||
|
||||
public void onStop() {
|
||||
Log.d(TAG, "onStop");
|
||||
log.debug("onStop");
|
||||
//mMap.destroy();
|
||||
}
|
||||
|
||||
@@ -235,7 +236,7 @@ public class MapView extends RelativeLayout {
|
||||
@Override
|
||||
protected void onSizeChanged(int width, int height,
|
||||
int oldWidth, int oldHeight) {
|
||||
Log.d(TAG, "onSizeChanged: " + width + "x" + height);
|
||||
log.debug("onSizeChanged: " + width + "x" + height);
|
||||
|
||||
super.onSizeChanged(width, height, oldWidth, oldHeight);
|
||||
|
||||
@@ -280,7 +281,7 @@ public class MapView extends RelativeLayout {
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
Log.d(TAG, "TODO Auto-generated method stub");
|
||||
log.debug("TODO Auto-generated method stub");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user