From 76d77950585b0cc1cbd74293568cb94b6a1133f0 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 6 Jul 2023 11:38:50 +0800 Subject: [PATCH] [3.3.0] fix bug of log npt --- .../logcatch/MogoLogCatchManager.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcatch/MogoLogCatchManager.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcatch/MogoLogCatchManager.kt index 19edc0f1b3..01c89acbde 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcatch/MogoLogCatchManager.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/logcatch/MogoLogCatchManager.kt @@ -218,8 +218,11 @@ object MogoLogCatchManager : IMogoOnMessageListener, 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, 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) }