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) }