• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
nowmorning
博客园    首页    新随笔    联系   管理    订阅  订阅

Easy Tag Write(3.2)

package skyseraph.android.util;

/**
 * @Title : LogUtil.java
 * @Package : tcl.nfc.phone.util
 * @ClassName : LogUtil
 * @Description : 通用调试类
 * @author : skyseraph00@163.com
 * @date : 2013-5-16 上午9:22:43
 * @version : V1.2
 */
public class LogUtil {

    public static void v(String tag, String msg) {
        if (MyConstant.isVerbose) {
            android.util.Log.v(tag, msg);
        }
    }

    public static void v(String tag, String msg, Throwable t) {
        if (MyConstant.isVerbose) {
            android.util.Log.v(tag, msg, t);
        }
    }

    public static void d(String tag, String msg) {
        if (MyConstant.isDebug) {
            android.util.Log.d(tag, msg);
        }
    }

    public static void d(String tag, String msg, Throwable t) {
        if (MyConstant.isDebug) {
            android.util.Log.d(tag, msg, t);
        }
    }

    public static void i(String tag, String msg) {
        if (MyConstant.isInformation) {
            android.util.Log.i(tag, msg);
        }
    }

    public static void i(String tag, String msg, Throwable t) {
        if (MyConstant.isInformation) {
            android.util.Log.i(tag, msg, t);
        }
    }

    public static void w(String tag, String msg) {
        if (MyConstant.isWarning) {
            android.util.Log.w(tag, msg);
        }
    }

    public static void w(String tag, String msg, Throwable t) {
        if (MyConstant.isWarning) {
            android.util.Log.w(tag, msg, t);
        }
    }

    public static void e(String tag, String msg) {
        if (MyConstant.isError) {
            android.util.Log.e(tag, msg);
        }
    }

    public static void e(String tag, String msg, Throwable t) {
        if (MyConstant.isError) {
            android.util.Log.e(tag, msg, t);
        }
    }
}

 

posted @ 2016-11-06 14:33  Eternal_memory  阅读(159)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3