New file |
| | |
| | | package com.hdl.sdk.link.common.utils;
|
| | |
|
| | | import android.util.Log;
|
| | |
|
| | | /**
|
| | | * Created by Tong on 2021/9/23.
|
| | | */
|
| | | public class LogUtils {
|
| | |
|
| | | private static final String TAG = "HDLSDK";
|
| | |
|
| | | private static boolean isEnabled = true;
|
| | |
|
| | | public static boolean isEnabled() {
|
| | | return isEnabled;
|
| | | }
|
| | |
|
| | | public static void setEnabled(boolean enabled) {
|
| | | isEnabled = enabled;
|
| | | }
|
| | |
|
| | | public static void d(String tag, String msg) {
|
| | | if (tag != null && msg != null && isEnabled) {
|
| | | Log.d(TAG, tag + "-- " + msg);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void e(String tag, String msg) {
|
| | | if (tag != null && msg != null && isEnabled) {
|
| | | Log.e(TAG, tag + "-- " + msg);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void w(String tag, String msg) {
|
| | | if (tag != null && msg != null && isEnabled) {
|
| | | Log.w(TAG, tag + "-- " + msg);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void v(String tag, String msg) {
|
| | | if (tag != null && msg != null && isEnabled) {
|
| | | Log.v(TAG, tag + "-- " + msg);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void i(String tag, String msg) {
|
| | | if (tag != null && msg != null && isEnabled) {
|
| | | Log.i(TAG, tag + "-- " + msg);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void i(String msg) {
|
| | | if (msg != null && isEnabled) {
|
| | | Log.i(TAG, msg);
|
| | | }
|
| | | }
|
| | |
|
| | | public static void e(String msg) {
|
| | | if (msg != null && isEnabled) {
|
| | | Log.e(TAG, msg);
|
| | | }
|
| | | }
|
| | | }
|