Created
August 11, 2015 16:32
-
-
Save JChudasama/cbbf02d90f35fab3e609 to your computer and use it in GitHub Desktop.
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
public final class Log { | |
public static boolean DEBUG = true; | |
public static String TAG = "TestDB"; | |
public static void v(String msg) { | |
if (DEBUG) | |
android.util.Log.v(TAG, msg); | |
} | |
public static void v(Exception e) { | |
if (DEBUG) { | |
e.printStackTrace(); | |
} | |
} | |
public static void v(String... args) { | |
if (DEBUG) { | |
StringBuffer strBuffer = new StringBuffer(); | |
for (String temp : args) { | |
strBuffer.append(temp).append(" "); | |
} | |
android.util.Log.v(TAG, strBuffer.toString()); | |
} | |
} | |
public static void e(String... args) { | |
if (DEBUG) { | |
android.util.Log.e(TAG, "------START--------"); | |
v(args); | |
android.util.Log.e(TAG, "------END--------"); | |
} | |
} | |
public static void e(String msg) { | |
if (DEBUG) { | |
android.util.Log.e(TAG, "------START--------"); | |
v(msg); | |
android.util.Log.e(TAG, "------END--------"); | |
} | |
} | |
public static void e(Exception e) { | |
if (DEBUG) { | |
android.util.Log.e(TAG, "------START--------"); | |
v(e); | |
android.util.Log.e(TAG, "------END--------"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment