Skip to content

Instantly share code, notes, and snippets.

@hrules6872
Created February 25, 2015 11:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hrules6872/c00777b4eee2cc7bb12b to your computer and use it in GitHub Desktop.
Save hrules6872/c00777b4eee2cc7bb12b to your computer and use it in GitHub Desktop.
Log
public class Log {
static final boolean isLoggable = BuildConfig.DEBUG;
static final String TAG = BuildConfig.APPLICATION_ID;
public static void i(String tag, String string) {
if (isLoggable) android.util.Log.i(tag, string);
}
public static void i(String string) {
if (isLoggable) android.util.Log.i(TAG, string);
}
public static void e(String tag, String string) {
if (isLoggable) android.util.Log.e(tag, string);
}
public static void e(String string) {
if (isLoggable) android.util.Log.e(TAG, string);
}
public static void d(String tag, String string) {
if (isLoggable) android.util.Log.d(tag, string);
}
public static void d(String string) {
if (isLoggable) android.util.Log.d(TAG, string);
}
public static void v(String tag, String string) {
if (isLoggable) android.util.Log.v(tag, string);
}
public static void v(String string) {
if (isLoggable) android.util.Log.v(TAG, string);
}
public static void w(String tag, String string) {
if (isLoggable) android.util.Log.w(tag, string);
}
public static void w(String string) {
if (isLoggable) android.util.Log.w(TAG, string);
}
}
@hrules6872
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment