fix: use loguru native formatting to prevent KeyError on messages containing curly braces

Closes #857
This commit is contained in:
Nikolas de Hor
2026-02-19 17:19:36 -03:00
parent d22929305f
commit 53b83a38e2
18 changed files with 80 additions and 80 deletions

View File

@@ -142,7 +142,7 @@ class ChannelManager:
try:
await channel.start()
except Exception as e:
logger.error(f"Failed to start channel {name}: {e}")
logger.error("Failed to start channel {}: {}", name, e)
async def start_all(self) -> None:
"""Start all channels and the outbound dispatcher."""
@@ -180,7 +180,7 @@ class ChannelManager:
await channel.stop()
logger.info(f"Stopped {name} channel")
except Exception as e:
logger.error(f"Error stopping {name}: {e}")
logger.error("Error stopping {}: {}", name, e)
async def _dispatch_outbound(self) -> None:
"""Dispatch outbound messages to the appropriate channel."""
@@ -198,7 +198,7 @@ class ChannelManager:
try:
await channel.send(msg)
except Exception as e:
logger.error(f"Error sending to {msg.channel}: {e}")
logger.error("Error sending to {}: {}", msg.channel, e)
else:
logger.warning(f"Unknown channel: {msg.channel}")