Fix logger name; fix mamoe/mirai#1691

This commit is contained in:
Karlatemp 2021-11-20 00:19:16 +08:00
parent 735e31551a
commit fe2d8332fe
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -96,8 +96,13 @@ internal object MiraiConsoleImplementationBridge : CoroutineScope, MiraiConsoleI
override val loggerController: LoggerController by instance::loggerController override val loggerController: LoggerController by instance::loggerController
init { init {
@Suppress("DEPRECATION") // TODO: Replace to standard api
MiraiLogger.setDefaultLoggerCreator(this::createLogger) @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
DefaultFactoryOverrides.override { requester, identity ->
return@override createLogger(
identity ?: requester.kotlin.simpleName ?: requester.simpleName
)
}
} }