package com.ftrend.ftrendpos.Util;

import android.text.TextUtils;
import android.util.Log;

import com.lidroid.xutils.util.OtherUtils;

public class WyLogUtils {
public static String customTagPre = "wy";
private static boolean isDebug = true;


public static void e(String deBugInfo) {
if (isDebug) {
StackTraceElement caller = OtherUtils.getCallerStackTraceElement();
String tag = generateTag(caller);
Log.e(tag, deBugInfo);
}
}

private static String generateTag(StackTraceElement caller) {
String tag = "%s.%s(L:%d)";
String callerClazzName = caller.getClassName();
callerClazzName = callerClazzName.substring(callerClazzName.lastIndexOf(".") + 1);
tag = String.format(tag, callerClazzName, caller.getMethodName(), caller.getLineNumber());
tag = TextUtils.isEmpty(customTagPre) ? tag : customTagPre + ":" + tag;
return tag;
}
}

E/wy:ReportMenuFragment$1.onItemClick(L:117): run: 点击畅销商品排行