Skip to content

@sbtools/plugin-logs

npm

Plugin that adds live Docker log tailing, pg_stat_statements query monitoring, and a standalone HTML log viewer.

Dashboard Integration

  • The unified sbt dashboard also exposes live logs directly in the Logs page.
  • Live stream is served by dashboard APIs (/api/logs/stream, /api/logs/services) so you can monitor logs without leaving the dashboard shell.
  • logs viewer remains available as a standalone, dedicated viewer.

Quick Start

bash
npm install @sbtools/plugin-logs

Add to config: { "path": "@sbtools/plugin-logs" }

bash
# Tail all services
npx sbt logs

# Open log viewer
npx sbt logs viewer
# → http://localhost:3333

Commands

CommandDescription
logsTail all services (multiplexed)
logs <service>Tail single service
logs --listList services
logs pg-statsTop 20 queries by execution time
logs pg-stats --slowBy mean execution time
logs pg-stats --frequentBy call count
logs viewerStart HTML log viewer
$ npx sbt logs --list

Available services:
  ✓ functions    (running)
  ✓ db           (running)
  ✓ rest         (running)
  ✓ auth         (running)
  ✓ kong         (running)
  ✓ storage      (running)
  ✓ realtime     (running)
  ✓ studio       (running)

Configuration

KeyDefaultDescription
viewerPort3333Log viewer port
tailLines100Initial tail lines
dbContainersupabase-dbDB container name