Skip to content

feat: add cluster logs command#94

Merged
Davidonium merged 1 commit intomainfrom
feat/dhernando/cluster-logs
Apr 1, 2026
Merged

feat: add cluster logs command#94
Davidonium merged 1 commit intomainfrom
feat/dhernando/cluster-logs

Conversation

@Davidonium
Copy link
Copy Markdown
Collaborator

@Davidonium Davidonium commented Apr 1, 2026

Add cluster logs command

Adds a new qcloud cluster logs <cluster-id> subcommand that retrieves log entries for a cluster via the Monitoring gRPC service.

Usage

qcloud cluster logs <cluster-id> [flags]

Flags:
  -s, --since string   Start time for logs (RFC3339 or YYYY-MM-DD, default: 3 days ago)
  -u, --until string   End time for logs (RFC3339 or YYYY-MM-DD, default: now)
  -t, --timestamps     Prepend each log line with its timestamp
      --json           Output as JSON

Details

  • Time filters accept both RFC3339 (2024-01-01T00:00:00Z) and date-only (2024-01-01) formats. When omitted, the server applies its own defaults.
  • The --timestamps flag prepends each line with a human-readable UTC timestamp; without it only the raw log message is printed.
  • --json outputs the full response proto, consistent with other commands.
  • Cluster ID shell completion is wired up via the existing completion helper.

@Davidonium Davidonium merged commit 54e78de into main Apr 1, 2026
8 checks passed
@Davidonium Davidonium deleted the feat/dhernando/cluster-logs branch April 1, 2026 13:18
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