add func of map cache file depends on push message to open
This commit is contained in:
@@ -29,5 +29,10 @@ class MogoLogCatchConst {
|
||||
* 上传本地缓存链路日志
|
||||
*/
|
||||
const val CACHE_TRACE_UPLOAD = 5
|
||||
|
||||
/**
|
||||
* 下发map缓存日志开关开启
|
||||
*/
|
||||
const val CACHE_MAP_UPLOAD = 6
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ import com.zhidao.loglib.bean.RemoteLogPushContent
|
||||
import com.zhidao.loglib.call.LogInfoManagerFactory
|
||||
import com.zhidao.loglib.core.ILogListener
|
||||
import com.zhidao.loglib.core.LogInfoManager
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.CACHE_MAP_UPLOAD
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.CACHE_TRACE_UPLOAD
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.LOCAL_CONFIG_CLOSE_LOG
|
||||
import com.zhjt.mogo_core_function_devatools.logcatch.MogoLogCatchConst.Companion.LOCAL_CONFIG_OPEN_LOG
|
||||
@@ -49,6 +50,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
private val manualContent = RemoteLogPushContent()
|
||||
private val catchingList: MutableList<String> = mutableListOf()
|
||||
private var logInfoManager: LogInfoManager? = null
|
||||
private var mapCacheUpload = false
|
||||
|
||||
fun init(context: Context) {
|
||||
mContext = context
|
||||
@@ -108,6 +110,10 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
TipToast.longTip("上传本地缓存链路日志")
|
||||
LogInfoManagerFactory.cacheTraceLogUpload()
|
||||
}
|
||||
CACHE_MAP_UPLOAD -> {
|
||||
TipToast.longTip("上传本地地图缓存日志")
|
||||
mapCacheUpload = true
|
||||
}
|
||||
else -> {
|
||||
}
|
||||
}
|
||||
@@ -235,6 +241,9 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
}
|
||||
|
||||
override fun uploadFile(filePath: String) {
|
||||
if(!mapCacheUpload){
|
||||
return
|
||||
}
|
||||
val file = File(filePath)
|
||||
if (file.isFile) {
|
||||
CallerLogger.d("$M_DEVA$TAG", "uploadFile path : $filePath")
|
||||
|
||||
Reference in New Issue
Block a user