fix(hotreload): use %s formatting in logging strings

This commit is contained in:
cswimr 2025-01-26 01:53:40 +00:00
parent 6ffa81fdee
commit 6c25d61dfd
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087

View file

@ -97,13 +97,13 @@ class HotReloadHandler(RegexMatchingEventHandler):
else:
dest = ""
self.logger.info(f"File {event.src_path} has been {event.event_type}{dest}.")
self.logger.info("File %s has been %s%s.", event.src_path, event.event_type, dest)
run_coroutine_threadsafe(self.reload_cogs(cogs_to_reload), loop=self.bot.loop)
async def reload_cogs(self, cog_names: Sequence[str]) -> None:
"""Reload modified cog."""
core_logic = CoreLogic(bot=self.bot)
self.logger.info(f"Reloading cogs: {humanize_list(cog_names, style='unit')}")
self.logger.info("Reloading cogs: %s", humanize_list(cog_names, style="unit"))
await core_logic._reload(pkg_names=cog_names)
self.logger.info(f"Reloaded cogs: {humanize_list(cog_names, style='unit')}")
self.logger.info("Reloaded cogs: %s", humanize_list(cog_names, style="unit"))