Created
December 15, 2015 09:52
-
-
Save kshitijkumar23-zz/12e2fda072b3931ac950 to your computer and use it in GitHub Desktop.
Wrapper over Log methods to have debug logs without exposing them to release builds
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 AppLogger | |
{ | |
public static void d(String TAG, String text) | |
{ | |
if (BuildConfig.DEBUG) | |
{ | |
Log.d(TAG, text); | |
} | |
} | |
public static void i(String TAG, String text) | |
{ | |
if (BuildConfig.DEBUG) | |
{ | |
Log.i(TAG, text); | |
} | |
} | |
public static void e(String TAG, String text) | |
{ | |
if (BuildConfig.DEBUG) | |
{ | |
Log.e(TAG, text); | |
} | |
} | |
public static void v(String TAG, String text) | |
{ | |
if (BuildConfig.DEBUG) | |
{ | |
Log.v(TAG, text); | |
} | |
} | |
public static void critical(String TAG, String text) | |
{ | |
Log.e(TAG, text); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment