Fix logging
All checks were successful
ci/woodpecker/push/docker Pipeline was successful

This commit is contained in:
Oliver Traber 2024-04-20 17:36:35 +02:00
parent 791d0834b9
commit dfa36b6294

View file

@ -12,13 +12,13 @@ class WebSocketWrapper():
async def recv(self) -> str: async def recv(self) -> str:
try: try:
text = await self._websocket.receive_text() text = await self._websocket.receive_text()
logger.info("Message received: {}", text) logger.info("Message received: %s", text)
return text return text
except WebSocketDisconnect as e: except WebSocketDisconnect as e:
raise ConnectionClosed(e.code, 'WebSocketWrapper') raise ConnectionClosed(e.code, 'WebSocketWrapper')
async def send(self, msg: str) -> None: async def send(self, msg: str) -> None:
logger.info("Message sent: {}", msg) logger.info("Message sent: %s", msg)
await self._websocket.send_text(msg) await self._websocket.send_text(msg)
async def close(self, code: int, reason: str) -> None: async def close(self, code: int, reason: str) -> None: