public class Logger {
private static final String TAG = "TAG";
public static boolean isLog = true;
public static void v(String message) {
if (isLog)
Log.v(TAG, message);
}
public static void d(String message) {
if (isLog)
Log.d(TAG, message);
}
public static void i(String message) {
if (isLog)
Log.i(TAG, message);
}
public static void w(String message) {
if (isLog)
Log.w(TAG, message);
}
public static void e(String message) {
if (isLog)
Log.e(TAG, message);
}
public static void v(String tag, String message) {
if (isLog)
Log.v(TAG + " : " + tag, message);
}
public static void d(String tag, String message) {
if (isLog)
Log.d(TAG + " : " + tag, message);
}
public static void i(String tag, String message) {
if (isLog)
Log.i(TAG + " : " + tag, message);
}
public static void w(String tag, String message) {
if (isLog)
Log.w(TAG + " : " + tag, message);
}
public static void e(String tag, String message) {
if (isLog)
Log.e(TAG + " : " + tag, message);
}
}
当前标题:代码:AndroidLog日志工具
转载来于:
http://cxhlcq.com/article/gicohc.html