Created
February 25, 2015 11:41
-
-
Save hector6872/c00777b4eee2cc7bb12b to your computer and use it in GitHub Desktop.
Log
This file contains hidden or 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
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Much better https://gist.github.com/hector6872/3e047ef1a7ed2a525104 :)