websocket: show more debug

This commit is contained in:
Thomas Farstrike
2025-05-22 21:06:24 +02:00
parent 3c97106e1c
commit 23563bc907
+2 -2
View File
@@ -305,7 +305,7 @@ class WebSocketApp:
async for msg in ws:
import micropython
print(f"websocket.py _connect_and_run thread stack used: {micropython.stack_use()}")
_log_debug(f"websocket.py _connect_and_run received msg: type={msg.type}, length: {len(msg.data)} and data={str(msg.data)[:70]}...")
_log_debug(f"websocket.py _connect_and_run received msg: type={msg.type}, length: {len(msg.data)} and data={str(msg.data)[:120]}...")
if not self.running:
_log_debug("Not running, breaking message loop")
break
@@ -331,7 +331,7 @@ class WebSocketApp:
async def _send_async(self, data, opcode):
"""Async send implementation."""
_log_debug(f"Sending: opcode={opcode}, data={str(data)[:90]}...")
_log_debug(f"Sending: opcode={opcode}, data={str(data)[:700]}")
try:
if opcode == ABNF.OPCODE_TEXT:
await self.ws.send_str(data)