Skip to content

add WebSocket debug.log streaming for standalone mode#22

Open
tequdev wants to merge 1 commit intoTransia-RnD:mainfrom
tequdev:debugstream
Open

add WebSocket debug.log streaming for standalone mode#22
tequdev wants to merge 1 commit intoTransia-RnD:mainfrom
tequdev:debugstream

Conversation

@tequdev
Copy link
Copy Markdown
Contributor

@tequdev tequdev commented Mar 25, 2026

Summary

  • Add a sidecar container (debugstream) that streams debug.log lines via WebSocket, filtered by r-address
  • Endpoint: ws://localhost:9999/debugstream/{raddress} — only lines matching the given address are sent
  • Uses a Docker named volume ({protocol}-log) shared between xahaud and debugstream containers (no host sync needed)
  • Volume is ephemeral — cleaned up on docker compose down -v via stop.sh

Changes

  • New: deploykit/debugstream/server.py — aiohttp-based WebSocket server with async tail-follow
  • New: deploykit/debugstream/Dockerfile — lightweight Python 3.12-slim container
  • Modified: main.py — integrate debugstream into create_xahau_standalone_folder(), switch log volume from bind mount to named volume
  • Modified: deploy_kit.py — add build_debugstream_service(), update stop script with -v flag
  • Modified: cli.py — add --debugstream_port option (default: 9999)
  • New: tests/test_debugstream.py — 8 unit tests

Scope

  • Xahau standalone (up:standalone) only. XRPL image mode accepts the parameter but does not use it.

Test plan

  • poetry run pytest tests/unit tests/test_debugstream.py — all 55 tests pass
  • Run xrpld-netgen up:standalone and verify debugstream container starts
  • Connect via wscat -c ws://localhost:9999/debugstream/{raddress} and confirm filtered log lines are streamed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant