package com.lide.smartroomlide.util; import android.util.Log; /** * @author * @time 2017/3/7 11:07 * @desc ${log工具类,当项目上线前更改level的值为Nothing 即可将log内容屏蔽} */ public class LogUtil { private static final int Verbose = 1; private static final int Debug = 2; private static final int Info = 3; private static final int Warn = 4; private static final int Error = 5; private static final int Nothing = 6; private static final int Level = Verbose; public static void V(String TAG, String msg) { if (Level <= Verbose) { Log.v(TAG, msg); } } public static void D(String TAG, String msg) { if (Level <= Debug) { Log.d(TAG, msg); } } public static void I(String TAG, String msg) { if (Level <= Info) { Log.i(TAG, msg); } } public static void W(String TAG, String msg) { if (Level <= Warn) { Log.w(TAG, msg); } } public static void E(String TAG, String msg) { if (Level <= Error) { Log.e(TAG, msg); } } }
logutil
最新推荐文章于 2021-06-10 10:36:35 发布