append logcatch file name for badcase scene

This commit is contained in:
zhongchao
2022-03-17 21:17:15 +08:00
parent 9d4c66e705
commit 646d4d4e2b
5 changed files with 11 additions and 11 deletions

View File

@@ -35,8 +35,8 @@ class DevaToolsProvider : IDevaToolsProvider {
MogoLogCatchManager.startCatchLog() MogoLogCatchManager.startCatchLog()
} }
override fun startLogCatch(duration: Int) { override fun startLogCatch(duration: Int, logPrefixName: String?) {
MogoLogCatchManager.startCatchLog(duration) MogoLogCatchManager.startCatchLog(duration, logPrefixName)
} }
override fun stopLogCatch() { override fun stopLogCatch() {

View File

@@ -10,12 +10,12 @@ import com.mogo.commons.AbsMogoApplication
import com.mogo.commons.debug.DebugConfig import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.constants.MoGoConfig import com.mogo.eagle.core.data.constants.MoGoConfig
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
import com.mogo.eagle.core.utilcode.mogo.logger.Logger import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
import com.mogo.eagle.core.utilcode.util.ThreadUtils import com.mogo.eagle.core.utilcode.util.ThreadUtils
@@ -103,14 +103,14 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
return false return false
} }
fun startCatchLog(duration: Int = 10) { fun startCatchLog(duration: Int = 10, logPrefixName: String? = null) {
if (catchingList.contains(MANUAL_CATCH_PKG_NAME)) { if (catchingList.contains(MANUAL_CATCH_PKG_NAME)) {
TipToast.shortTip("已经在抓取日志了,请稍后再试") TipToast.shortTip("已经在抓取日志了,请稍后再试")
} else { } else {
CallerLogger.d("$M_DEVA$TAG", "开始抓取日志==== duration : $duration") CallerLogger.d("$M_DEVA$TAG", "开始抓取日志==== duration : $duration")
manualContent.type = START_CATCH_LOG manualContent.type = START_CATCH_LOG
manualContent.duration = duration manualContent.duration = duration
startCatchLog(manualContent) startCatchLog(manualContent, logPrefixName)
} }
} }
@@ -120,7 +120,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
stopCatchLog(manualContent) stopCatchLog(manualContent)
} }
private fun startCatchLog(content: RemoteLogPushContent) { private fun startCatchLog(content: RemoteLogPushContent, logPrefixName: String? = null) {
catchingList.add(content.pkgName) catchingList.add(content.pkgName)
var delay = (content.duration).toLong() var delay = (content.duration).toLong()
handler.removeMessages(MSG_TRY_CLOSE_LOG) handler.removeMessages(MSG_TRY_CLOSE_LOG)
@@ -136,6 +136,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
mContext, mContext,
MoGoAiCloudClientConfig.getInstance().sn, MoGoAiCloudClientConfig.getInstance().sn,
AppConfigInfo.toString(), AppConfigInfo.toString(),
logPrefixName?.replace("_", "-"),
content, content,
this this
) )

View File

@@ -22,7 +22,7 @@ interface IDevaToolsProvider : IMoGoFunctionServerProvider {
* 开始抓取日志 * 开始抓取日志
* duration 抓取时间(分钟) * duration 抓取时间(分钟)
*/ */
fun startLogCatch(duration: Int) fun startLogCatch(duration: Int, logPrefixName: String? = null)
/** /**
* 停止i抓取日志 * 停止i抓取日志

View File

@@ -1,7 +1,6 @@
package com.mogo.eagle.core.function.call.devatools package com.mogo.eagle.core.function.call.devatools
import android.content.Context import android.content.Context
import android.view.ContextMenu
import android.view.View import android.view.View
import com.mogo.eagle.core.data.constants.MogoServicePaths import com.mogo.eagle.core.data.constants.MogoServicePaths
import com.mogo.eagle.core.data.deva.chain.ChainLogParam import com.mogo.eagle.core.data.deva.chain.ChainLogParam
@@ -30,8 +29,8 @@ object CallerDevaToolsManager {
* 开始抓取全量日志 * 开始抓取全量日志
* duration 分钟数 * duration 分钟数
*/ */
fun startCatchLog(duration: Int) { fun startCatchLog(duration: Int, logPrefixName: String? = null) {
devaToolsProviderApi?.startLogCatch(duration) devaToolsProviderApi?.startLogCatch(duration, logPrefixName)
} }
/** /**

View File

@@ -60,7 +60,7 @@ HOOK_LOG_VERSION=1.5.17
SERVICE_CHAIN_VERSION=1.0.53 SERVICE_CHAIN_VERSION=1.0.53
################ 外部依赖引用 ################ ################ 外部依赖引用 ################
# loglib # loglib
LOGLIB_VERSION=1.2.15 LOGLIB_VERSION=1.2.19
######## MogoAiCloudSDK Version ######## ######## MogoAiCloudSDK Version ########
# 网络请求 # 网络请求
MOGO_NETWORK_VERSION=1.3.31 MOGO_NETWORK_VERSION=1.3.31