solve print issue

This commit is contained in:
jiahua.liu 2020-03-22 20:32:58 +08:00
parent 4f89f7b4e7
commit c42250072b
2 changed files with 5 additions and 6 deletions

View File

@ -178,9 +178,9 @@ internal object MiraiConsoleLogger {
}
}
operator fun invoke(priority: LogPriority, identityStr: String, identity: Long, e: Exception? = null) {
operator fun invoke(priority: LogPriority, identityStr: String, identity: Long, e: Throwable? = null) {
if (e != null) {
MiraiConsole.frontEnd.pushLog(priority, identityStr, identity, "${e.stackTrace}")
MiraiConsole.frontEnd.pushLog(priority, identityStr, identity, e.stackTrace.joinToString("\n"))
}
}
@ -191,12 +191,11 @@ internal object MiraiConsoleLogger {
}
}
operator fun invoke(identityStr: String, identity: Long, e: Exception? = null) {
operator fun invoke(identityStr: String, identity: Long, e: Throwable? = null) {
if (e != null) {
MiraiConsole.frontEnd.pushLog(LogPriority.INFO, identityStr, identity, "${e.stackTrace}")
MiraiConsole.frontEnd.pushLog(LogPriority.INFO, identityStr, identity, e.stackTrace.joinToString("\n"))
}
}
}

View File

@ -93,7 +93,7 @@ object PluginManager {
pluginsFound[description.name] = description
pluginsLocation[description.name] = file
} catch (e: Exception) {
logger.info(e.message)
logger.info(e)
}
}
}