package com.sheep.gamegroup.util;

import android.util.Log;

/**
 * Created by realicing on 2018/5/12.
 * realicing@sina.com
 */
public class LogUtil {

    /**
     * isDebug ,debug环境下设成true，方便查看日志，release环境下设成false，减少打印信息的输出，
     */
    private static boolean isDebug = true;

    public static void println(Object... msgs) {
        if (TestUtil.isTest()) {
            for (int i = 0; i < msgs.length; i++) {
                if (i != 0) {
                    System.out.print(" ");
                }
                System.out.print(msgs[i]);
            }
            System.out.println();
        }
    }

    /**
     * @param message 需要打印的String,
     *                调用系统的Log.i(?,?);
     */
    public static void logI(String message){
        if (isDebug){
            Log.i("LOGI",message);
        }
    }
    /**
     * @param message 需要打印的String,
     *                  调用系统的Log.e(?,?);
     */
    public static void logE(String message){
        if (isDebug){
            Log.e("LOGE",message);
        }
    }
    /**
     * @param message 需要打印的String,
     *                  调用系统的Log.d(?,?);
     */
    public static void logD(String message){
        if (isDebug){
            Log.d("LOGD",message);
        }
    }

}
