Skip to content

feat(paas): add real-time log streaming with --follow flag#34

Merged
emilioacc merged 1 commit intomainfrom
emilio/atxp-1431-real-time-log-streaming
Jan 28, 2026
Merged

feat(paas): add real-time log streaming with --follow flag#34
emilioacc merged 1 commit intomainfrom
emilio/atxp-1431-real-time-log-streaming

Conversation

@emilioacc
Copy link
Contributor

Summary

  • Add --follow (-f) flag to npx atxp paas worker logs command for continuous log streaming
  • Implement client-side polling using the existing since parameter
  • Add --interval flag to customize polling interval (default: 2000ms)

Features

  • Stream logs continuously with Ctrl+C to stop
  • Color-coded log output by level (error=red, warn=yellow, info=blue, debug=gray)
  • Deduplication to prevent duplicate log entries
  • Automatic retry logic (3 attempts with 5s delay on failure)
  • Memory-bounded deduplication set (max 10k entries)
  • Works with existing filters (--level, --since)

Test plan

  • Deploy a test worker that generates periodic logs
  • Run npx atxp paas worker logs <name> --follow
  • Verify logs stream in real-time
  • Verify Ctrl+C stops gracefully with "Stopping log stream..." message
  • Test --level filter works in follow mode
  • Verify no duplicate logs appear
  • Test custom interval with --interval 500
  • Verify CI passes

Usage

# Stream logs continuously
npx atxp paas worker logs my-api --follow

# With custom interval (500ms)
npx atxp paas worker logs my-api -f --interval 500

# Combined with filters
npx atxp paas worker logs my-api --follow --level error

Closes ATXP-1431

🤖 Generated with Claude Code

Add --follow (-f) flag to `npx atxp paas worker logs` command for
continuous log streaming via client-side polling.

Features:
- Stream logs continuously with Ctrl+C to stop
- Configurable polling interval via --interval flag (default: 2000ms)
- Color-coded log output by level (error, warn, info, debug)
- Deduplication to prevent duplicate log entries
- Automatic retry logic (3 attempts with 5s delay)
- Memory-bounded deduplication set (max 10k entries)
- Works with existing filters (--level, --since)

Usage:
  npx atxp paas worker logs my-api --follow
  npx atxp paas worker logs my-api -f --interval 500
  npx atxp paas worker logs my-api --follow --level error

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@emilioacc emilioacc merged commit 049d5ed into main Jan 28, 2026
1 check passed
@emilioacc emilioacc deleted the emilio/atxp-1431-real-time-log-streaming branch January 28, 2026 21:00
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