Android Open Source - Speedometer Logger






From Project

Back to project page Speedometer.

License

The source code is released under:

Apache License

If you think the Android project Speedometer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

// Copyright 2011 Google Inc. All Rights Reserved.
/*from   ww w. j ava2s.c  o  m*/
package com.google.wireless.speed.speedometer;

import android.util.Log;

/**
 * Wrapper for logging operations which can be disabled by setting LOGGING_ENABLED.
 * 
 * @author mdw@google.com (Matt Welsh)
 *
 */
public class Logger {
  private final static boolean LOGGING_ENABLED = false;
  private final static String TAG = "Speedometer";
  
  public static void d(String msg) {
    if (LOGGING_ENABLED) {
      Log.d(TAG, msg);
    }
  }
  
  public static void d(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.d(TAG, msg, t);
    }
  }
  
  public static void e(String msg) {
    if (LOGGING_ENABLED) {
      Log.e(TAG, msg);
    }
  }
  
  public static void e(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.e(TAG, msg, t);
    }
  }
  
  public static void i(String msg) {
    if (LOGGING_ENABLED) {
      Log.i(TAG, msg);
    }
  }
  
  public static void i(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.i(TAG, msg, t);
    }
  }
  
  public static void v(String msg) {
    if (LOGGING_ENABLED) {
      Log.v(TAG, msg);
    }
  }
  
  public static void v(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.v(TAG, msg, t);
    }
  }
  
  public static void w(String msg) {
    if (LOGGING_ENABLED) {
      Log.w(TAG, msg);
    }
  }
  
  public static void w(String msg, Throwable t) {
    if (LOGGING_ENABLED) {
      Log.w(TAG, msg, t);
    }
  }

}




Java Source Code List

com.google.wireless.speed.speedometer.AboutActivity.java
com.google.wireless.speed.speedometer.AccountSelector.java
com.google.wireless.speed.speedometer.BatteryCapPowerManager.java
com.google.wireless.speed.speedometer.Checkin.java
com.google.wireless.speed.speedometer.Config.java
com.google.wireless.speed.speedometer.DeviceInfo.java
com.google.wireless.speed.speedometer.DeviceProperty.java
com.google.wireless.speed.speedometer.Logger.java
com.google.wireless.speed.speedometer.MeasurementCreationActivity.java
com.google.wireless.speed.speedometer.MeasurementDesc.java
com.google.wireless.speed.speedometer.MeasurementError.java
com.google.wireless.speed.speedometer.MeasurementResult.java
com.google.wireless.speed.speedometer.MeasurementScheduleConsoleActivity.java
com.google.wireless.speed.speedometer.MeasurementScheduler.java
com.google.wireless.speed.speedometer.MeasurementSkippedException.java
com.google.wireless.speed.speedometer.MeasurementTask.java
com.google.wireless.speed.speedometer.ResultsConsoleActivity.java
com.google.wireless.speed.speedometer.SpeedometerApp.java
com.google.wireless.speed.speedometer.SpeedometerPreferenceActivity.java
com.google.wireless.speed.speedometer.SplashScreenActivity.java
com.google.wireless.speed.speedometer.SystemConsoleActivity.java
com.google.wireless.speed.speedometer.UpdateIntent.java
com.google.wireless.speed.speedometer.WatchdogBootReceiver.java
com.google.wireless.speed.speedometer.measurements.DnsLookupTask.java
com.google.wireless.speed.speedometer.measurements.HttpTask.java
com.google.wireless.speed.speedometer.measurements.PingTask.java
com.google.wireless.speed.speedometer.measurements.TracerouteTask.java
com.google.wireless.speed.speedometer.measurements.UDPBurstTask.java
com.google.wireless.speed.speedometer.util.MeasurementJsonConvertor.java
com.google.wireless.speed.speedometer.util.PhoneUtils.java
com.google.wireless.speed.speedometer.util.Util.java