1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-03-26 07:20:09 +08:00

Improve logs

This commit is contained in:
Him188 2020-02-19 18:36:04 +08:00
parent d829060072
commit c3bd03fcae

View File

@ -86,7 +86,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
if (!_network.isActive) {
return@subscribeAlways
}
bot.logger.info("Connection dropped or lost by server, retrying login")
bot.logger.info("Connection dropped by server or lost, retrying login")
tryNTimesOrException(configuration.reconnectionRetryTimes) { tryCount ->
if (tryCount != 0) {
@ -95,7 +95,10 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
network.relogin()
logger.info("Reconnected successfully")
return@subscribeAlways
}?.let { throw it }
}?.let {
logger.info("Cannot reconnect")
throw it
}
}
is BotOfflineEvent.Active -> {
val msg = if (event.cause == null) {