Skip to content

raindrop logs

Overview

The raindrop logs command provides access to logs from your deployed applications. You can query historical logs with time range filtering or stream logs in real-time as they occur.

The command includes two subcommands: query retrieves logs from a specific time period, and tail streams logs continuously. Both subcommands automatically detect your application and version from your manifest and configuration files when not explicitly specified.

Use logs to debug issues, monitor application behavior, trace request flows, and analyze errors. Filter by time range, trace ID, or status to find exactly what you need.

Basic Usage

View logs from the last hour:

Terminal window
raindrop logs query

Stream logs in real-time:

Terminal window
raindrop logs tail

Command Syntax

Terminal window
raindrop logs query [--application <name>] [--version <id>] [--output <format>]
[--startTime <time>] [--endTime <time>] [--last <duration>]
[--limit <number>] [--traceId <id>] [--status <status>]
raindrop logs tail [--application <name>] [--version <id>] [--output <format>]

Query Historical Logs

The query subcommand retrieves logs from a specified time range. The command defaults to the last hour if you provide no time parameters.

Flags

  • --application, -a <name> - Application name (auto-detected from manifest if omitted)
  • --version, -v <id> - Version ID (auto-detected from config if omitted)
  • --output, -o <format> - Output format: text or json (default: text)
  • --startTime, -s <time> - Start time as Unix timestamp in milliseconds or ISO 8601 string
  • --endTime, -e <time> - End time as Unix timestamp in milliseconds or ISO 8601 string
  • --last, -l <duration> - Query logs from the last duration (e.g., 1h, 30m, 2d)
  • --limit, -n <number> - Maximum number of log entries to return (default: 100)
  • --traceId <id> - Filter logs by trace ID to follow a specific request
  • --status <status> - Filter logs by status: ok or error

Duration Format

Specify durations using these units:

  • s - seconds (e.g., 30s)
  • m - minutes (e.g., 15m)
  • h - hours (e.g., 2h)
  • d - days (e.g., 7d)

Time Format

Provide timestamps in either format:

  • Unix timestamp in milliseconds: 1727702821000
  • ISO 8601 string: 2025-09-30T12:00:00Z

Time Range Logic

The command determines the time range using this priority:

  1. Explicit --startTime and --endTime flags
  2. Duration from --last flag (relative to current time)
  3. Default: last 1 hour if no flags provided

Stream Real-Time Logs

The tail subcommand streams logs continuously as your application generates them. Press Ctrl+C to stop streaming.

Flags

  • --application, -a <name> - Application name (auto-detected from manifest if omitted)
  • --version, -v <id> - Version ID (auto-detected from config if omitted)
  • --output, -o <format> - Output format: text or json (default: text)

Response Types

The streaming connection sends these message types:

  • heartbeat - Connection health checks (skipped in text output)
  • stream_started - Confirms stream initialization
  • events - Log entries grouped by trace ID
  • stream_ended - Indicates normal stream termination
  • service_error - Reports streaming service errors

Text mode displays control messages with status indicators and groups events by trace ID.

Examples

View Recent Logs

Query logs from the last 30 minutes:

Terminal window
raindrop logs query --last 30m

Query logs from the last 7 days with a 500-entry limit:

Terminal window
raindrop logs query --last 7d --limit 500

Query Specific Time Range

Query logs between two timestamps:

Terminal window
raindrop logs query --startTime 2025-09-30T10:00:00Z --endTime 2025-09-30T11:00:00Z

Query logs starting from a Unix timestamp:

Terminal window
raindrop logs query --startTime 1727697600000

Filter Logs

Find all error logs from the last hour:

Terminal window
raindrop logs query --status error

Follow a specific request by trace ID:

Terminal window
raindrop logs query --traceId trace_abc123def456

Query errors for a specific application version:

Terminal window
raindrop logs query --application my-api --version 01jk3m4n5p6q7r8s9t0u1v2w3x --status error

Export Logs

Export logs in JSON format for analysis:

Terminal window
raindrop logs query --last 24h --output json > logs.json

Export error logs from the last week:

Terminal window
raindrop logs query --last 7d --status error --output json > errors.json

Stream Real-Time Logs

Stream logs as they occur:

Terminal window
raindrop logs tail

Stream logs for a specific application in JSON format:

Terminal window
raindrop logs tail --application my-api --output json

Exit Codes

  • 0 - Command completed successfully
  • 1 - Command failed (invalid duration format, query/tail failed, missing version/application in config)
  • 2 - Invalid arguments provided (nonexistent flags)