Skip to content

Commit

Permalink
fix: debig outpit no handler json dump
Browse files Browse the repository at this point in the history
  • Loading branch information
phfr committed Dec 20, 2024
1 parent eb29460 commit a3f06fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion datadivr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ async def run_client(host: str, port: int) -> None:
logger.exception("websocket_connection_failed", error=str(e))
return

logger.debug("showing_example_json", examples=EXAMPLE_JSON)
console.print(f"Example JSON format: {EXAMPLE_JSON}")

tasks = [
Expand Down
4 changes: 3 additions & 1 deletion datadivr/transport/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ async def handle_event(self, event_data: dict, websocket: WebSocketClientProtoco
if response and isinstance(response, WebSocketMessage):
await send_message(websocket, response)
else:
self.logger.warning("no_handler_found", event_name=event_name)
self.logger.debug(
"no_handler_for_event", event_name=event_name, event_data=json.dumps(event_data, indent=2)
)

async def send_message(self, payload: Any, event_name: str, msg: Optional[str] = None, to: str = "others") -> None:
"""Send a message to the server.
Expand Down

0 comments on commit a3f06fb

Please sign in to comment.