Back to project page res-check.
The source code is released under:
Apache License
If you think the Android project res-check 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.harrikirik.rescheck.util; //ww w . ja va 2 s . c o m import com.harrikirik.rescheck.BuildConfig; /** * A little more convenient logging class * Harri Kirik, harri35@gmail.com */ public class Log { private String tag; private Log(final String tag) { this.tag = tag; } public static Log getInstance(final Object object) { return getInstance(object.getClass()); } public static Log getInstance(final Class clazz) { return getInstance(clazz.getSimpleName()); } public static Log getInstance(final String tag) { return new Log(tag); } public void d(final String msg) { d(msg, null); } public void d(final String msg, final Throwable e) { if (!BuildConfig.DEBUG) { // No not log this level for release return; } if (e == null) { android.util.Log.d(tag, msg); } else { android.util.Log.d(tag, msg, e); } } public void e(final String msg) { d(msg, null); } public void e(final String msg, final Throwable e) { if (e == null) { android.util.Log.e(tag, msg); } else { android.util.Log.e(tag, msg, e); } } }