Created
November 15, 2012 10:53
-
-
Save wonkwh/4077954 to your computer and use it in GitHub Desktop.
android logger class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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