Skip to content

Conversation

@nathanjcochran
Copy link
Member

@nathanjcochran nathanjcochran commented Jan 17, 2026

Adds a new tiger service logs command for viewing service logs with colorized output and automatic pagination. Also adds corresponding service_logs MCP tool.

Changes

  • Add tiger service logs command with --tail, --until, --node, and --output flags
  • Default --tail to 100 lines with automatic multi-page fetching as needed
  • Add colorized output for PostgreSQL log levels (ERROR/FATAL in red, WARNING in yellow, etc.)

Key Decisions

  • Log reversal: API returns logs in descending order (newest first), but terminal convention is oldest first/newest last, so we reverse before displaying
  • User-friendly parameters: --node instead of --service-ordinal, --until instead of --start-time (following Docker's convention - see docker logs --help)
  • Tail filter logic: Take first N logs from descending list (most recent), then reverse for display
  • Default tail: 100 lines is a reasonable default that works for most use cases without overwhelming the terminal or causing a huge number of page fetches (which slows down the command). Users can request more by specifying a larger value for --tail or by specifying an earlier timestamp for --until.

MCP Integration

The service_logs MCP tool was added after the CLI command, sharing the same common.FetchServiceLogs() implementation for consistency.

@nathanjcochran nathanjcochran changed the title Add 'tiger service logs' command with colorized output Add tiger service logs command and service_logs MCP tool Jan 17, 2026
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.

2 participants