mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-19 10:09:12 +08:00
[console/logging] Always load LoggerConfig
; Add LoggerConfig.Binding
settings
This commit is contained in:
parent
8a07308a56
commit
7537e29b0e
@ -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) {
|
||||
|
@ -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() }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user