diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/StandardLocationListener.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/StandardLocationListener.java index efe5d3a..fe789c7 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/StandardLocationListener.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/StandardLocationListener.java @@ -3,7 +3,6 @@ package pl.tpolgrabia.urbanexplorer.callbacks; import android.location.Location; import android.location.LocationListener; import android.os.Bundle; -import android.util.Log; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/WikiInfoRunBrowserCallback.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/WikiInfoRunBrowserCallback.java index 0f6e110..06f1170 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/WikiInfoRunBrowserCallback.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/callbacks/WikiInfoRunBrowserCallback.java @@ -2,12 +2,13 @@ package pl.tpolgrabia.urbanexplorer.callbacks; import android.content.Intent; import android.net.Uri; -import android.util.Log; import android.widget.Toast; import com.androidquery.callback.AjaxCallback; import com.androidquery.callback.AjaxStatus; import org.json.JSONException; import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import pl.tpolgrabia.urbanexplorer.dto.wiki.app.WikiAppObject; import pl.tpolgrabia.urbanexplorer.fragments.WikiLocationsFragment; @@ -15,6 +16,7 @@ import pl.tpolgrabia.urbanexplorer.fragments.WikiLocationsFragment; * Created by tpolgrabia on 14.09.16. */ public class WikiInfoRunBrowserCallback extends AjaxCallback { + private static final Logger lg = LoggerFactory.getLogger(WikiInfoRunBrowserCallback.class); private static final String CLASS_TAG = WikiInfoRunBrowserCallback.class.getSimpleName(); private WikiLocationsFragment wikiLocationsFragment; private final WikiAppObject item; @@ -44,7 +46,7 @@ public class WikiInfoRunBrowserCallback extends AjaxCallback { Uri.parse(wikiUrl)); wikiLocationsFragment.startActivity(intent); } catch (JSONException e) { - Log.e(CLASS_TAG, "Error", e); + lg.error("JSON error", e); } } } diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/handlers/SwipeHandler.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/handlers/SwipeHandler.java index f789a08..765593f 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/handlers/SwipeHandler.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/handlers/SwipeHandler.java @@ -1,14 +1,16 @@ package pl.tpolgrabia.urbanexplorer.handlers; -import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import pl.tpolgrabia.urbanexplorer.MainActivity; /** * Created by tpolgrabia on 13.09.16. */ public class SwipeHandler implements GestureDetector.OnGestureListener { + private static final Logger lg = LoggerFactory.getLogger(SwipeHandler.class); private static final String CLASS_TAG = SwipeHandler.class.getSimpleName(); private final MainActivity activity; private static final float SWIPE_THRESHOLD = 50; @@ -56,8 +58,8 @@ public class SwipeHandler implements GestureDetector.OnGestureListener { float diffx = e2.getX() - e1.getX(); float diffy = e2.getY() - e1.getY(); - Log.d(CLASS_TAG, "Flinging... diffx: " + diffx + " diffy" + diffy - + ", velocityx: " + velocityX + ", velocityY: " + velocityY); + lg.debug(CLASS_TAG, "Flinging... diffx: {} diffy: {}, velocityx: {}, velocityY: {}", + diffx, diffy, velocityX, velocityY); if (Math.abs(diffx) > Math.abs(diffy)) { // horizontal moves