Skip to content
Development
Command

/remote-logs

View remote dev container logs

From plugin
safe-agentic-workflow
39524 skills11 agents24 commands
Install
$ npx -y skills add bybren-llc/safe-agentic-workflow --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/remote-logs

Context preview

What this command does when you run it.

View remote dev container logs

Command definition

remote-logs.md
description: View remote dev container logs
argument-hint: [--follow] [--tail N]
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob]

View logs from the remote development environment containers.

> **๐Ÿ“‹ TEMPLATE**: This command is a template. Replace placeholders with your infrastructure values before use. See the **Customization Guide** at the bottom.

Workflow

1. Determine Log Mode

**If argument contains `--follow` or `-f`**:

  • Stream logs in real-time
  • Useful for monitoring deployments
  • Press Ctrl+C to exit

**If argument contains `--tail N`**:

  • Show last N lines
  • Default to 100 if not specified

**If no arguments**:

  • Show last 100 lines (default)

2. Execute Log Command

Get logs from all services:

# โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
# โ”‚ CUSTOMIZE: Replace with your SSH and project settings   โ”‚
# โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "cd {{PROJECT_PATH}} && ./scripts/dev-docker.sh logs --tail 100"

For specific service:

# Container names - customize for your project

# App logs (dev-mode - STANDARD port 3000)
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{APP_CONTAINER_DEV}} --tail 100"

# App logs (staging-mode - port 3001)
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{APP_CONTAINER_STAGING}} --tail 100"

# PostgreSQL logs (staging)
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{DB_CONTAINER_STAGING}} --tail 100"

# PostgreSQL logs (dev)
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{DB_CONTAINER_DEV}} --tail 100"

# Redis logs (staging)
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{REDIS_CONTAINER_STAGING}} --tail 100"

# Redis logs (dev)
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{REDIS_CONTAINER_DEV}} --tail 100"

3. Filter and Highlight

Parse logs for common patterns:

**Error Detection**:

  • `ERROR`, `Error`, `error`
  • `FATAL`, `Fatal`
  • `Exception`, `exception`
  • Stack traces

**Warning Detection**:

  • `WARN`, `Warning`, `warning`
  • `deprecated`

**Success Markers**:

  • `started`, `listening`, `ready`
  • `connected`, `successful`

Highlight critical issues in output.

4. Log Analysis

Provide quick analysis:

๐Ÿ“‹ Remote Dev Logs Analysis

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Dev Containers (STANDARD port {{DEV_PORT}})
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

{{APP_CONTAINER_DEV}} (Next.js):
  Status:    โœ… Running
  Errors:    0
  Warnings:  2
  Last Line: [14:35:22] Ready on http://localhost:{{DEV_PORT}}

{{DB_CONTAINER_DEV}}:
  Status:    โœ… Running
  Errors:    0
  Last Line: [14:34:10] database system is ready

{{REDIS_CONTAINER_DEV}}:
  Status:    โœ… Running
  Errors:    0
  Last Line: [14:34:08] Ready to accept connections

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Staging Containers (port {{STAGING_PORT}})
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

{{APP_CONTAINER_STAGING}} (Next.js):
  Status:    โœ… Running
  Errors:    0
  Warnings:  1
  Last Line: [14:35:22] Ready on http://localhost:{{STAGING_PORT}}
  Recent warnings:
    [14:34:15] WARN: Using development build
    [14:34:18] WARN: PostHog not initialized (missing key)

{{DB_CONTAINER_STAGING}}:
  Status:    โœ… Running
  Errors:    0
  Last Line: [14:34:10] database system is ready

{{REDIS_CONTAINER_STAGING}}:
  Status:    โœ… Running
  Errors:    0
  Last Line: [14:34:08] Ready to accept connections

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Overall Health: โœ… Healthy
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

Recommendation: No critical issues detected
Warnings are expected for dev environment

5. Interactive Follow Mode

If `--follow` requested, start streaming:

ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "cd {{PROJECT_PATH}} && ./scripts/dev-docker.sh logs --follow"

Inform user:

  • "Streaming logs... (Press Ctrl+C to stop)"
  • Show timestamp of each log line
  • Highlight errors in red if possible

6. Log Search

Offer quick log search options:

**Search for specific term**:

# Search staging or dev logs
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{APP_CONTAINER_STAGING}} 2>&1 | grep -i 'search-term'"
ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}} "docker logs {{APP_CONTAINER_DEV}} 2>&1 | grep -i 'search-term'"

**Common search patterns**:

  • "ERROR" - All errors
  • "database" - Database connection logs
  • "Redis" - Redis connection logs
  • "API" - API request logs
  • "POST /api" - POST requests only

Usage Examples

View Recent Logs

/remote-logs

Shows last 100 lines from all containers

Follow Logs in Real-Time

/remote-logs --follow

Streams logs continuously

View More Lines

/remote-logs --tail 500

Shows last 500 lines

View and Follow

/remote-logs --tail 200 --follow

Shows last 200 lines, then continues streaming

Error Handling

SSH Connection Fails

Check network connectivity:

# Check if remote host is reachable
ping {{REMOTE_HOST}}

# Or check via VPN/Tailscale
tailscale status | grep {{REMOTE_HOST}}

Provide manual SSH command:

ssh -i {{SSH_KEY_PATH}} {{REMOTE_USER}}@{{REMOTE_HOST}}

Container Not Found

If container doesn't exist:

  • Check services are running: `/remote-health`
  • Start services: `/remote-deploy`

Permission Issues

If log access denied:

  • Verify docker group membership
  • Provide sudo alternative

Output Options

Compact Mode (Default)

Show analysis summary + filtered logs (errors/warnings highlighted)

Full Mode (If requested)

Show complete raw logs without filtering

Service-Specific Mode

If user specifies container name, map to appropriate container:

Staging mode:

  • `app` or `next` โ†’ {{APP_CONTAINER_STAGING}}
  • `postgres` or `db` โ†’ {{DB_CONTAINER_STAGING}}
  • `re
Read more
Ships withsafe-agentic-workflow

SAW โ€” SAFe Agentic Workflow AI Agent Harness for Multi-Agent Team Workflows Built on SAFe methodology (Scaled Agile Framework), adapted for AI agent teams (Now With AI-DLC!) Works for any team with repeatable processes: Software, Marketing, Research, Legal, Operations.

Get the whole plugin