diff --git a/mirai-console/backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt b/mirai-console/backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt index 53662d4ac..45e09d9f7 100644 --- a/mirai-console/backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt +++ b/mirai-console/backend/mirai-console/src/internal/MiraiConsoleImplementationBridge.kt @@ -36,6 +36,7 @@ import net.mamoe.mirai.console.internal.data.builtins.AutoLoginConfig.Account.Co import net.mamoe.mirai.console.internal.data.builtins.AutoLoginConfig.Account.PasswordKind.MD5 import net.mamoe.mirai.console.internal.data.builtins.AutoLoginConfig.Account.PasswordKind.PLAIN import net.mamoe.mirai.console.internal.data.builtins.DataScope +import net.mamoe.mirai.console.internal.data.builtins.LoggerConfig import net.mamoe.mirai.console.internal.data.builtins.PluginDependenciesConfig import net.mamoe.mirai.console.internal.extension.GlobalComponentStorage import net.mamoe.mirai.console.internal.extension.GlobalComponentStorageImpl @@ -268,6 +269,8 @@ ___ ____ _ _____ _ val loggerController = loggerController if (loggerController is LoggerControllerImpl) { consoleDataScope.addAndReloadConfig(loggerController.loggerConfig) + } else { + consoleDataScope.addAndReloadConfig(LoggerConfig()) } consoleDataScope.reloadAll() if (loggerController is LoggerControllerImpl) { diff --git a/mirai-console/backend/mirai-console/src/internal/data/builtins/LoggerConfig.kt b/mirai-console/backend/mirai-console/src/internal/data/builtins/LoggerConfig.kt index b5cbc71fe..0edaaff5a 100644 --- a/mirai-console/backend/mirai-console/src/internal/data/builtins/LoggerConfig.kt +++ b/mirai-console/backend/mirai-console/src/internal/data/builtins/LoggerConfig.kt @@ -9,6 +9,7 @@ package net.mamoe.mirai.console.internal.data.builtins +import kotlinx.serialization.Serializable import net.mamoe.mirai.console.ConsoleFrontEndImplementation import net.mamoe.mirai.console.data.ReadOnlyPluginConfig import net.mamoe.mirai.console.data.ValueDescription @@ -40,4 +41,14 @@ public class LoggerConfig : ReadOnlyPluginConfig("Logger") { ) ) + @Serializable + public class Binding @MiraiExperimentalApi public constructor( + ) + + @ValueDescription( + """ + 是否启动外部日志框架桥接 + """ + ) + public val binding: Binding by value { Binding() } }