From: Eugene Crosser Date: Fri, 3 Feb 2012 13:13:16 +0000 (+0400) Subject: change Log verbosity X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=816e15ad1c9de478be113a53a51b483791503c30;p=WhereAmI.git change Log verbosity --- diff --git a/src/org/average/whereami/Authorize.java b/src/org/average/whereami/Authorize.java index 804486f..9b42a36 100644 --- a/src/org/average/whereami/Authorize.java +++ b/src/org/average/whereami/Authorize.java @@ -34,7 +34,7 @@ public class Authorize extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - Log.w(TAG, "Starting task to retrieve request token."); + Log.v(TAG, "Starting task to retrieve request token."); prefs = PreferenceManager.getDefaultSharedPreferences(this); } @@ -52,7 +52,7 @@ public class Authorize extends Activity { webview.setWebViewClient(new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap bitmap) { - Log.w(TAG, "onPageStarted : " + url); + Log.v(TAG, "onPageStarted : " + url); } @Override public void onPageFinished(WebView view, String url) { @@ -79,7 +79,7 @@ public class Authorize extends Activity { e.printStackTrace(); } } - Log.w(TAG, "onPageFinished : " + url); + Log.v(TAG, "onPageFinished : " + url); } private String extractCodeFromUrl(String url) { diff --git a/src/org/average/whereami/LastLocation.java b/src/org/average/whereami/LastLocation.java index b02a4b1..4b82564 100644 --- a/src/org/average/whereami/LastLocation.java +++ b/src/org/average/whereami/LastLocation.java @@ -69,14 +69,14 @@ public final class LastLocation extends Oracle { cloc.getTimestampMs().toString()); return locationMessage(lat, lon, tsm); } catch (GoogleJsonResponseException e) { - Log.v(TAG, "GoogleJsonResponseException: " + e); + Log.e(TAG, "GoogleJsonResponseException: " + e); if (e.getResponse().getStatusCode() == 401) { return authErrorMessage; } else { return e.getMessage(); } } catch (HttpResponseException e) { - Log.v(TAG, "HttpResponseException: " + e); + Log.e(TAG, "HttpResponseException: " + e); return e.getMessage(); } catch (IOException e) { e.printStackTrace(); diff --git a/src/org/average/whereami/PhoneLog.java b/src/org/average/whereami/PhoneLog.java index dde2a1a..ff64fa9 100644 --- a/src/org/average/whereami/PhoneLog.java +++ b/src/org/average/whereami/PhoneLog.java @@ -62,14 +62,14 @@ public final class PhoneLog extends Oracle { return scanEvents(calendar_id, peer_name); } } catch (GoogleJsonResponseException e) { - Log.v(TAG, "GoogleJsonResponseException: " + e); + Log.e(TAG, "GoogleJsonResponseException: " + e); if (e.getResponse().getStatusCode() == 401) { return authErrorMessage; } else { return e.getMessage(); } } catch (HttpResponseException e) { - Log.v(TAG, "HttpResponseException: " + e); + Log.e(TAG, "HttpResponseException: " + e); return e.getMessage(); } catch (IOException e) { e.printStackTrace(); diff --git a/src/org/average/whereami/WhereAmI.java b/src/org/average/whereami/WhereAmI.java index d127fed..1002b3a 100644 --- a/src/org/average/whereami/WhereAmI.java +++ b/src/org/average/whereami/WhereAmI.java @@ -48,19 +48,19 @@ public class WhereAmI extends Activity private class BgUpdate extends AsyncTask { @Override protected String doInBackground(Void... params) { - Log.w(TAG, "BgUpdate " + updater + " starting"); + Log.v(TAG, "BgUpdate " + updater + " starting"); return updater.getResult(); } @Override protected void onPostExecute(String str) { - Log.w(TAG, "BgUpdate callback executing"); + Log.v(TAG, "BgUpdate callback executing"); tv.setText(str); runningtasks--; if (runningtasks <= 0) { if (managewifi) { boolean wifion = wifiman.setWifiEnabled(false); - Log.w(TAG, "disabling wifi result " + wifion); + Log.v(TAG, "disabling wifi result " + wifion); } Time tm = new Time(); tm.setToNow(); @@ -71,7 +71,7 @@ public class WhereAmI extends Activity @Override protected void onCancelled() { - Log.w(TAG, "BgUpdate callback cancelled"); + Log.v(TAG, "BgUpdate callback cancelled"); runningtasks--; } } @@ -134,14 +134,14 @@ public class WhereAmI extends Activity private Runnable updateInfo = new Runnable () { public void run() { - Log.w(TAG, "updateInfo starting"); + Log.v(TAG, "updateInfo starting"); if (managewifi) { IntentFilter intentFilter = new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"); registerReceiver(connChanged,intentFilter); connChangedRegistered = true; boolean wifion = wifiman.setWifiEnabled(true); - Log.w(TAG, "enabling wifi result " + wifion); + Log.v(TAG, "enabling wifi result " + wifion); } else { for (int i = 0; i < ut.length; i++) { runningtasks++; @@ -155,7 +155,7 @@ public class WhereAmI extends Activity private Runnable resetInfo = new Runnable () { public void run() { - Log.w(TAG, "resetInfo starting"); + Log.v(TAG, "resetInfo starting"); if (connChangedRegistered) { unregisterReceiver(connChanged); connChangedRegistered = false; @@ -171,7 +171,7 @@ public class WhereAmI extends Activity } if (managewifi) { boolean wifion = wifiman.setWifiEnabled(false); - Log.w(TAG, "disabling wifi result " + wifion); + Log.v(TAG, "disabling wifi result " + wifion); } } }; @@ -185,7 +185,7 @@ public class WhereAmI extends Activity NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting(); - Log.w(TAG, "Connectivity changed to " + isConnected); + Log.v(TAG, "Connectivity changed to " + isConnected); if (isConnected) { for (int i = 0; i < ut.length; i++) { runningtasks++; @@ -217,11 +217,11 @@ public class WhereAmI extends Activity new UpdateTarget((TextView)findViewById(R.id.phonecall), new LastLocation(res, store)) }; - Log.w(TAG, "created UI, about to start update task"); + Log.v(TAG, "created UI, about to start update task"); mHandler.post(updateClock); mHandler.post(updateCal); mHandler.post(updateInfo); - Log.w(TAG, "created UI, update task created"); + Log.v(TAG, "created UI, update task created"); } /** Called when reactivated */ @@ -231,7 +231,7 @@ public class WhereAmI extends Activity boolean fullscreen = prefs.getBoolean("fullscreen", false); managewifi = prefs.getBoolean("managewifi", false); updatedelay = Long.parseLong(prefs.getString("updateperiod", "1200000")); - Log.w("WhereAmI", "fullscreen: " + fullscreen + + Log.v("WhereAmI", "fullscreen: " + fullscreen + ", managewifi: " + managewifi + ", updatedelay: " + updatedelay); if (fullscreen) { @@ -247,14 +247,14 @@ public class WhereAmI extends Activity @Override public void onPause() { super.onPause(); - Log.w(TAG, "going background"); + Log.v(TAG, "going background"); } /** Called when the activity is destroyed. */ @Override public void onDestroy() { super.onDestroy(); - Log.w(TAG, "going down"); + Log.v(TAG, "going down"); mHandler.removeCallbacks(updateClock); mHandler.removeCallbacks(updateCal); mHandler.removeCallbacks(updateInfo); @@ -264,7 +264,7 @@ public class WhereAmI extends Activity } if (managewifi) { boolean wifion = wifiman.setWifiEnabled(false); - Log.w(TAG, "disabling wifi result " + wifion); + Log.v(TAG, "disabling wifi result " + wifion); } } @@ -284,11 +284,11 @@ public class WhereAmI extends Activity finish(); return true; case R.id.authorize: - Log.w(TAG, "authorize requested"); + Log.v(TAG, "authorize requested"); startActivity(new Intent(this, Authorize.class)); return true; case R.id.settings: - Log.w(TAG, "settings requested"); + Log.v(TAG, "settings requested"); startActivity(new Intent(this, WhereAmIprefs.class)); return true; default: