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.
/*fromwww.java2s.com*/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)
*
*/publicclass Logger {
privatefinalstaticboolean LOGGING_ENABLED = false;
privatefinalstatic String TAG = "Speedometer";
publicstaticvoid d(String msg) {
if (LOGGING_ENABLED) {
Log.d(TAG, msg);
}
}
publicstaticvoid d(String msg, Throwable t) {
if (LOGGING_ENABLED) {
Log.d(TAG, msg, t);
}
}
publicstaticvoid e(String msg) {
if (LOGGING_ENABLED) {
Log.e(TAG, msg);
}
}
publicstaticvoid e(String msg, Throwable t) {
if (LOGGING_ENABLED) {
Log.e(TAG, msg, t);
}
}
publicstaticvoid i(String msg) {
if (LOGGING_ENABLED) {
Log.i(TAG, msg);
}
}
publicstaticvoid i(String msg, Throwable t) {
if (LOGGING_ENABLED) {
Log.i(TAG, msg, t);
}
}
publicstaticvoid v(String msg) {
if (LOGGING_ENABLED) {
Log.v(TAG, msg);
}
}
publicstaticvoid v(String msg, Throwable t) {
if (LOGGING_ENABLED) {
Log.v(TAG, msg, t);
}
}
publicstaticvoid w(String msg) {
if (LOGGING_ENABLED) {
Log.w(TAG, msg);
}
}
publicstaticvoid w(String msg, Throwable t) {
if (LOGGING_ENABLED) {
Log.w(TAG, msg, t);
}
}
}