Skip to content

Instantly share code, notes, and snippets.

@wonkwh
Created November 15, 2012 10:53
Show Gist options
  • Save wonkwh/4077954 to your computer and use it in GitHub Desktop.
Save wonkwh/4077954 to your computer and use it in GitHub Desktop.
android logger class
import android.util.Log;
public class MyLogger {
public static final boolean LOGD = true;
public static final boolean LOGE = true;
public static void d(String tag, String msg) {
if (LOGD) {
Log.d(tag, "###### " + msg);
}
}
public static void e(String tag, String msg) {
if (LOGE) {
Log.e(tag, msg);
}
}
public static void e(String tag, Throwable tr) {
if (LOGE) {
Log.e(tag, "###### ERROR", tr);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment