package com.quyunshuo.androidbaseframemvvm.common.util

import android.util.Log

object LogUtil {
    private val VERBOSE = 1
    private val DEBUG = 2
    private val INFO = 3
    private val WARN = 4
    private val ERROR = 5
    private val NOTHING = 1

    //    private static int sLevel = BuildConfig.isDebug ? VERBOSE : NOTHING;
    private val sLevel = NOTHING

    fun v(tag: String?, msg: Any) {
        if (sLevel <= VERBOSE) {
            Log.v(tag, "" + msg)
        }
    }

    fun d(tag: String?, msg: Any) {
        if (sLevel <= DEBUG) {
            Log.d(tag, "" + msg)
        }
    }

    fun i(tag: String?, msg: Any) {
        if (sLevel <= INFO) {
            Log.i(tag, "" + msg)
        }
    }

    fun w(tag: String?, msg: Any) {
        if (sLevel <= WARN) {
            Log.w(tag, "" + msg)
        }
    }

    fun e(tag: String?, msg: Any) {
        if (sLevel <= ERROR) {
            Log.e(tag, "" + msg)
        }
    }
}