Skip to content

feat(cli): implement docksight agent logs - #108

Merged
rodriguecyber merged 2 commits into
Open-Source-Kigali:developfrom
AshSgDe29071999:feat/101-agent-logs
Aug 21, 2026
Merged

feat(cli): implement docksight agent logs#108
rodriguecyber merged 2 commits into
Open-Source-Kigali:developfrom
AshSgDe29071999:feat/101-agent-logs

Conversation

@AshSgDe29071999

@AshSgDe29071999 AshSgDe29071999 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements docksight agent logs so operators do not need platform-specific journalctl / Get-Content commands.

Changes

  • New agent_logs.go with --lines / -n (default 50)
  • Uses install.NewController(layout).Logs(...)
  • Not-installed and permission-denied errors are explicit (with elevation hint)
  • Output is printed unmodified
  • Remove logs from agentPlaceholders

Out of scope

--follow would need interface changes on both Linux and Windows controllers. Followers can use the command from Layout.LogsCommand() (also shown by agent status).

Test plan

  • cd apps/cli && go build ./... && go vet ./... && go test ./cmd/...
  • Installed agent: docksight agent logs prints recent lines
  • docksight agent logs -n 10 limits output
  • Not installed: clear error, non-zero exit

Fixes #101

Add agent logs with --lines/-n (default 50) via UnitController.Logs.
Report not-installed and permission-denied clearly; print output as-is.

Fixes Open-Source-Kigali#101

@rodriguecyber rodriguecyber left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve conflict Please

@rodriguecyber
rodriguecyber merged commit 4782ddd into Open-Source-Kigali:develop Aug 21, 2026
1 check passed
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.

Implement docksight agent logs

2 participants