Back to project page visiting-card-android.
The source code is released under:
GNU General Public License
If you think the Android project visiting-card-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.matrix.visitingcard.logger; //from w w w. j a v a 2 s .com import android.util.Log; public class VLogger { private static final boolean enableLog = true; private static final boolean enableCallerClassName = true; public static void e(String msg) { if (enableLog) { Log.e(getCallerClassName(), msg); } } public static void d(String msg) { if (enableLog) { Log.d(getCallerClassName(), msg); } } public static void v(String msg) { if (enableLog) { Log.v(getCallerClassName(), msg); } } public static void i(String msg) { if (enableLog) { Log.i(getCallerClassName(), msg); } } public static void w(String msg) { if (enableLog) { Log.w(getCallerClassName(), msg); } } public static void wtf(String msg) { if (enableLog) { Log.wtf(getCallerClassName(), msg); } } public static String getCallerClassName() { if (enableCallerClassName) { return new Exception().getStackTrace()[2].getClassName(); } else { return "VisitingCardLog "; } } }