fix bug of log switch
This commit is contained in:
@@ -11,7 +11,6 @@ import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.eagle.core.data.constants.MoGoConfig
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||
import com.mogo.eagle.core.network.NetConfig
|
||||
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.storage.SharedPrefsMgr
|
||||
@@ -82,7 +81,7 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
return false
|
||||
}
|
||||
|
||||
fun startCatchLog(duration:Int = 10) {
|
||||
fun startCatchLog(duration: Int = 10) {
|
||||
if (catchingList.contains(MANUAL_CATCH_PKG_NAME)) {
|
||||
TipToast.shortTip("已经在抓取日志了,请稍后再试")
|
||||
} else {
|
||||
@@ -156,13 +155,11 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
|
||||
* 根据状态收紧Logger的限制
|
||||
*/
|
||||
private fun closeLoggerLevel() {
|
||||
if (catchingList.isNotEmpty()) {
|
||||
LogUtils.getConfig().isLogSwitch = false
|
||||
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
|
||||
CallerAutoPilotManager.setEnableLog(false)
|
||||
CallerAutoPilotManager.setIsWriteLog(false)
|
||||
}
|
||||
LogUtils.getConfig().isLogSwitch = false
|
||||
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
|
||||
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
|
||||
CallerAutoPilotManager.setEnableLog(false)
|
||||
CallerAutoPilotManager.setIsWriteLog(false)
|
||||
}
|
||||
|
||||
override fun onError(errorCount: Int) {
|
||||
|
||||
Reference in New Issue
Block a user