package com.diandi.demo.util;
/**
* ************************************************************
* ********* User : SuLinger(462679107@qq.com) .
* ********* Date : 2014-09-25 .
* ********* Time: 2014-09-25 .
* ********* Project name :DianDi1.1.5 .
* ********* Copyright @ 2014, SuLinger, All Rights Reserved
* *************************************************************
*/
import android.util.Log;
/**
* *******************************************************************************
* ********* Author : klob(kloblic@gmail.com) .
* ********* Date : 2014-11-29 .
* ********* Time : 11:46 .
* ********* Project name : Diandi1.18 .
* ********* Version : 1.0
* ********* Copyright @ 2014, klob, All Rights Reserved
* *******************************************************************************
*/
public class L {
private static final String TAG = "tag";
public static boolean isDebug = true;// 是否需要打印bug,可以在application的onCreate函数里面初始化
private L() {
/* cannot be instantiated */
}
// 下面四个是默认tag的函数
public static void i(String msg) {
if (isDebug)
Log.i(TAG, msg);
}
public static void d(String msg) {
if (isDebug)
Log.d(TAG, msg);
}
public static void e(String msg) {
if (isDebug)
Log.e(TAG, msg);
}
public static void v(String msg) {
if (isDebug)
Log.v(TAG, msg);
}
// 下面是传入自定义tag的函数
public static void i(String tag, String msg) {
if (isDebug)
Log.i(tag, msg);
}
public static void d(String tag, String msg) {
if (isDebug)
Log.i(tag, msg);
}
public static void e(String tag, String msg) {
if (isDebug)
Log.i(tag, msg);
}
public static void v(String tag, String msg) {
if (isDebug)
Log.i(tag, msg);
}
}