package cn.jxau.logcat.util;
import android.util.Log;
public class LogUtil {
private static Boolean isEnable=true;
public static void e(String tag,String msg){
if (isEnable)
Log.e(tag, msg);
}
public static void w(String tag,String msg){
if (isEnable)
Log.e(tag, msg);
}
public static void i(String tag,String msg){
if (isEnable)
Log.e(tag, msg);
}
public static void a(String tag,String msg){
if (isEnable)
Log.e(tag, msg);
}
public static void d(String tag,String msg){
if (isEnable)
Log.e(tag, msg);
}
}
建一个Log包,将该类放入包中
1.测试时,设为true,其他类直接调用
2.上线时,设为false