Improved logging to app end
This commit is contained in:
@@ -52,7 +52,7 @@ class Application(DiscordBotApplicationABC):
|
||||
self._api.join()
|
||||
return
|
||||
|
||||
self._logger.trace(__name__, f"Try to start {DiscordBotService.__name__}")
|
||||
self._logger.info(__name__, f"Try to start {DiscordBotService.__name__}")
|
||||
await self._bot.start_async()
|
||||
await self._bot.stop_async()
|
||||
except Exception as e:
|
||||
@@ -64,9 +64,9 @@ class Application(DiscordBotApplicationABC):
|
||||
|
||||
self._is_stopping = True
|
||||
try:
|
||||
self._logger.trace(__name__, f"Try to stop {DiscordBotService.__name__}")
|
||||
self._logger.info(__name__, f"Try to stop {DiscordBotService.__name__}")
|
||||
await self._bot.close()
|
||||
self._logger.trace(__name__, f"Stopped {DiscordBotService.__name__}")
|
||||
self._logger.info(__name__, f"Stopped {DiscordBotService.__name__}")
|
||||
except Exception as e:
|
||||
self._logger.error(__name__, "stop failed", e)
|
||||
|
||||
|
Reference in New Issue
Block a user