[3.3.0] fix bug of log npt

This commit is contained in:
zhongchao
2023-07-06 11:38:50 +08:00
parent 13d4bba3a9
commit 76d7795058

View File

@@ -218,8 +218,11 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
*/
private fun openLoggerLevel() {
Logger.init(LogLevel.DEBUG)
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = true
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = true
val config = MoGoAiCloudClient.getInstance().aiCloudClientConfig
if(config != null){
config.isShowDebugLog = true
config.isShowNetDebugLog = true
}
CallerAutoPilotControlManager.setEnableLog(true)
}
@@ -228,8 +231,11 @@ object MogoLogCatchManager : IMogoOnMessageListener<RemoteLogPushContent>, Handl
*/
private fun closeLoggerLevel() {
Logger.init(if (DebugConfig.isDebug()) LogLevel.DEBUG else LogLevel.OFF)
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowDebugLog = false
MoGoAiCloudClient.getInstance().aiCloudClientConfig.isShowNetDebugLog = false
val config = MoGoAiCloudClient.getInstance().aiCloudClientConfig
if(config != null){
config.isShowDebugLog = false
config.isShowNetDebugLog = false
}
CallerAutoPilotControlManager.setEnableLog(false)
}