diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/PluginManagerImpl.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/PluginManagerImpl.kt index 5885b1b38..f5f1728f8 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/PluginManagerImpl.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/internal/plugin/PluginManagerImpl.kt @@ -26,7 +26,7 @@ internal object PluginManagerImpl : PluginManager { @Suppress("ObjectPropertyName") private val _pluginLoaders: MutableList> = mutableListOf() private val loadersLock: ReentrantLock = ReentrantLock() - private val logger = MiraiConsole.newLogger("PluginManager") + private val logger = MiraiConsole.newLogger("plugin") @JvmField internal val resolvedPlugins: MutableList = mutableListOf() diff --git a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsoleThread.kt b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsoleThread.kt index 5447636f8..472f8698f 100644 --- a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsoleThread.kt +++ b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/ConsoleThread.kt @@ -47,7 +47,7 @@ internal fun startupConsoleThread() { } CoroutineScope(dispatch).launch { - val consoleLogger = DefaultLogger("Console") + val consoleLogger = DefaultLogger("console") while (isActive) { try { val next = MiraiConsoleFrontEndPure.requestInput("").let { @@ -62,7 +62,7 @@ internal fun startupConsoleThread() { if (next.isBlank()) { continue } - consoleLogger.debug("INPUT> $next") + // consoleLogger.debug("INPUT> $next") val result = ConsoleCommandSenderImpl.executeCommandDetailed(next) when (result.status) { CommandExecuteStatus.SUCCESSFUL -> { diff --git a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt index 1bfb4421e..9e1d2e269 100644 --- a/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt +++ b/frontend/mirai-console-pure/src/main/kotlin/net/mamoe/mirai/console/pure/MiraiConsolePureLoader.kt @@ -20,21 +20,13 @@ package net.mamoe.mirai.console.pure -import kotlinx.coroutines.isActive -import net.mamoe.mirai.console.MiraiConsole import net.mamoe.mirai.console.MiraiConsoleImplementation.Companion.start -import net.mamoe.mirai.console.command.BuiltInCommands -import net.mamoe.mirai.console.command.Command.Companion.primaryName -import net.mamoe.mirai.console.command.CommandExecuteStatus -import net.mamoe.mirai.console.command.CommandManager -import net.mamoe.mirai.console.command.CommandManager.INSTANCE.executeCommandDetailed import net.mamoe.mirai.console.command.ConsoleCommandSender import net.mamoe.mirai.console.util.ConsoleInternalAPI import net.mamoe.mirai.message.data.Message import net.mamoe.mirai.message.data.content import net.mamoe.mirai.utils.DefaultLogger import java.io.PrintStream -import kotlin.concurrent.thread /** * mirai-console-pure CLI 入口点 @@ -58,14 +50,14 @@ internal fun overrideSTD() { System.setOut( PrintStream( BufferedOutputStream( - logger = DefaultLogger("sout").run { ({ line: String? -> info(line) }) } + logger = DefaultLogger("stdout").run { ({ line: String? -> info(line) }) } ) ) ) System.setErr( PrintStream( BufferedOutputStream( - logger = DefaultLogger("serr").run { ({ line: String? -> warning(line) }) } + logger = DefaultLogger("stderr").run { ({ line: String? -> warning(line) }) } ) ) )