Android Open Source - res-check Log






From Project

Back to project page res-check.

License

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.

Java Source Code

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);
        }
    }

}




Java Source Code List

com.harrikirik.rescheck.Config.java
com.harrikirik.rescheck.activity.DetailActivity.java
com.harrikirik.rescheck.activity.MainActivity.java
com.harrikirik.rescheck.adapter.InfoAdapter.java
com.harrikirik.rescheck.dto.BaseInfoObject.java
com.harrikirik.rescheck.dto.CategorisedInfoItem.java
com.harrikirik.rescheck.dto.InfoCategory.java
com.harrikirik.rescheck.dto.InfoImageItem.java
com.harrikirik.rescheck.dto.InfoItem.java
com.harrikirik.rescheck.fragment.DetailFragment.java
com.harrikirik.rescheck.fragment.SpecFragment.java
com.harrikirik.rescheck.util.InfoUtil.java
com.harrikirik.rescheck.util.Log.java
com.harrikirik.rescheck.util.Util.java