package com.yidianling.home.utils

import android.util.Log

/**
 * Created by haorui on 2019/2/16.
 * Des:
 */
class HomeLogPrinter {
    companion object {
        /**
         * 解决LogCat打印长数据不完整问题
         */
        fun printLongLog(tag: String, msg: String) {
            var msg = msg
            val maxStrLength = 2001 - tag.length
            while (msg.length > maxStrLength) {
                Log.i(tag, msg.substring(0, maxStrLength))
                msg = msg.substring(maxStrLength)
            }
            Log.i(tag, msg)
        }

    }
}