LogoLogo
HomeAPIBlog
3.0.0-SNAPSHOT
3.0.0-SNAPSHOT
  • INTRODUCTION
    • Getting Started
      • Running Local Development Servers
      • Beginner Tutorial: Hello World
      • Beginner Tutorial: Hello Database
      • Tutorial: Wheels, AJAX, and You
    • Frameworks and Wheels
    • Requirements
    • Manual Installation
    • Upgrading
    • Screencasts
  • Command Line Tools
    • CLI Overview
    • Quick Start Guide
    • Command Reference
      • Core Commands
        • wheels init
        • wheels info
        • wheels reload
        • wheels deps
        • wheels destroy
        • wheels watch
      • Code Generation
        • wheels generate app
        • wheels generate app-wizard
        • wheels generate controller
        • wheels generate model
        • wheels generate view
        • wheels generate property
        • wheels generate route
        • wheels generate resource
        • wheels generate api-resource
        • wheels generate frontend
        • wheels generate test
        • wheels generate snippets
        • wheels scaffold
      • Database Commands
        • wheels dbmigrate info
        • wheels dbmigrate latest
        • wheels dbmigrate up
        • wheels dbmigrate down
        • wheels dbmigrate reset
        • wheels dbmigrate exec
        • wheels dbmigrate create blank
        • wheels dbmigrate create table
        • wheels dbmigrate create column
        • wheels dbmigrate remove table
        • wheels db schema
        • wheels db seed
      • Testing Commands
        • wheels test
        • wheels test run
        • wheels test coverage
        • wheels test debug
      • Configuration Commands
        • wheels config list
        • wheels config set
        • wheels config env
      • Environment Management
        • wheels env
        • wheels env setup
        • wheels env list
        • wheels env switch
      • Plugin Management
        • wheels plugins
        • wheels plugins list
        • wheels plugins install
        • wheels plugins remove
      • Code Analysis
        • wheels analyze
        • wheels analyze code
        • wheels analyze performance
        • wheels analyze security
      • Security Commands
        • wheels security
        • wheels security scan
      • Performance Commands
        • wheels optimize
        • wheels optimize performance
      • Documentation Commands
        • wheels docs
        • wheels docs generate
        • wheels docs serve
      • CI/CD Commands
        • wheels ci init
      • Docker Commands
        • wheels docker init
        • wheels docker deploy
      • Deployment Commands
        • wheels deploy
        • wheels deploy audit
        • wheels deploy exec
        • wheels deploy hooks
        • wheels deploy init
        • wheels deploy lock
        • wheels deploy logs
        • wheels deploy proxy
        • wheels deploy push
        • wheels deploy rollback
        • wheels deploy secrets
        • wheels deploy setup
        • wheels deploy status
        • wheels deploy stop
    • CLI Development Guides
      • Creating Commands
      • Service Architecture
      • Migrations Guide
      • Testing Guide
  • Working with Wheels
    • Conventions
    • Configuration and Defaults
    • Directory Structure
    • Switching Environments
    • Testing Your Application
    • Using the Test Environment
    • Contributing to Wheels
    • Submitting Pull Requests
    • Documenting your Code
  • Handling Requests with Controllers
    • Request Handling
    • Rendering Content
    • Redirecting Users
    • Sending Files
    • Sending Email
    • Responding with Multiple Formats
    • Using the Flash
    • Using Filters
    • Verification
    • Event Handlers
    • Routing
    • URL Rewriting
      • Apache
      • IIS
      • Tomcat
      • Nginx
    • Obfuscating URLs
    • Caching
    • Nesting Controllers
    • CORS Requests
  • Displaying Views to Users
    • Pages
    • Partials
    • Linking Pages
    • Layouts
    • Form Helpers and Showing Errors
    • Displaying Links for Pagination
    • Date, Media, and Text Helpers
    • Creating Custom View Helpers
    • Localization
  • Database Interaction Through Models
    • Object Relational Mapping
    • Creating Records
    • Reading Records
    • Updating Records
    • Deleting Records
    • Column Statistics
    • Dynamic Finders
    • Getting Paginated Data
    • Associations
    • Nested Properties
    • Object Validation
    • Object Callbacks
    • Calculated Properties
    • Transactions
    • Dirty Records
    • Soft Delete
    • Automatic Time Stamps
    • Database Migrations
      • Migrations in Production
    • Using Multiple Data Sources
  • Plugins
    • Installing and Using Plugins
    • Developing Plugins
    • Publishing Plugins
  • Project Documentation
    • Overview
  • External Links
    • Source Code
    • Issue Tracker
    • Sponsor Us
    • Community
Powered by GitBook
LogoLogo
On this page
  • Synopsis
  • Description
  • Options
  • Examples
  • View recent deployment logs
  • Follow current deployment logs
  • View specific deployment logs
  • Filter by time range
  • Search for errors
  • Export logs to file
  • View logs in JSON format
  • Log Levels
  • Log Structure
  • Use Cases
  • Real-time monitoring
  • Troubleshooting failures
  • Audit trail
  • Performance analysis
  • Advanced Filtering
  • Complex grep patterns
  • Multiple filters
  • Log aggregation
  • Log Retention
  • Best Practices
  • Integration
  • Troubleshooting
  • No logs appearing
  • Log export failing
  • See Also

Was this helpful?

Edit on GitHub
Export as PDF
  1. Command Line Tools
  2. Command Reference
  3. Deployment Commands

wheels deploy logs

View and manage deployment logs for troubleshooting and monitoring.

Synopsis

wheels deploy logs [options]

Description

The wheels deploy logs command provides access to deployment logs, allowing you to view, search, and export logs from past and current deployments. This is essential for troubleshooting deployment issues, auditing deployment history, and monitoring deployment progress.

Options

  • --deployment-id, -d - Specific deployment ID to view logs for

  • --environment, -e - Filter logs by environment (default: all)

  • --tail, -f - Follow log output in real-time

  • --lines, -n - Number of lines to display (default: 100)

  • --since - Show logs since timestamp (e.g., "2023-01-01", "1h", "30m")

  • --until - Show logs until timestamp

  • --grep, -g - Filter logs by pattern (regex supported)

  • --level - Filter by log level (debug, info, warn, error)

  • --format - Output format (text, json, csv) (default: text)

  • --output, -o - Export logs to file

  • --no-color - Disable colored output

Examples

View recent deployment logs

wheels deploy logs

Follow current deployment logs

wheels deploy logs --tail

View specific deployment logs

wheels deploy logs --deployment-id dep-123456

Filter by time range

wheels deploy logs --since "1 hour ago" --until "30 minutes ago"

Search for errors

wheels deploy logs --grep "error|failed" --level error

Export logs to file

wheels deploy logs --deployment-id dep-123456 --output deployment.log

View logs in JSON format

wheels deploy logs --format json --lines 50

Log Levels

Logs are categorized by severity:

  • DEBUG: Detailed diagnostic information

  • INFO: General informational messages

  • WARN: Warning messages for potential issues

  • ERROR: Error messages for failures

  • FATAL: Critical errors causing deployment failure

Log Structure

Each log entry contains:

  • Timestamp

  • Log level

  • Deployment stage

  • Component/service

  • Message

  • Additional metadata

Example log entry:

2023-12-01 14:23:45 [INFO] [pre-deploy] [backup] Starting database backup
2023-12-01 14:23:47 [INFO] [pre-deploy] [backup] Backup completed successfully
2023-12-01 14:23:48 [INFO] [deploy] [app] Deploying application version 2.1.0
2023-12-01 14:23:52 [ERROR] [deploy] [app] Failed to start service: connection refused

Use Cases

Real-time monitoring

# Monitor ongoing deployment
wheels deploy logs --tail --deployment-id current

Troubleshooting failures

# Find errors in recent deployments
wheels deploy logs --since "1 day ago" --level error

# Search for specific error
wheels deploy logs --grep "database connection" --level error

Audit trail

# Export deployment logs for audit
wheels deploy logs \
  --since "2023-01-01" \
  --until "2023-12-31" \
  --format csv \
  --output audit-2023.csv

Performance analysis

# Find slow operations
wheels deploy logs --grep "took [0-9]+ seconds" | grep -E "took [0-9]{3,} seconds"

Advanced Filtering

Complex grep patterns

# Find database-related errors
wheels deploy logs --grep "database|sql|connection.*error"

# Find deployment timing
wheels deploy logs --grep "(started|completed|failed).*deploy"

Multiple filters

# Production errors in last hour
wheels deploy logs \
  --environment production \
  --level error \
  --since "1 hour ago"

Log aggregation

# Count errors by component
wheels deploy logs --level error --format json | \
  jq -r '.component' | sort | uniq -c

Log Retention

  • Logs are retained based on environment settings

  • Default retention periods:

    • Production: 90 days

    • Staging: 30 days

    • Development: 7 days

  • Archived logs available through backup systems

Best Practices

  1. Use appropriate filters: Narrow down logs to relevant entries

  2. Export important logs: Save logs for failed deployments

  3. Monitor in real-time: Use --tail for active deployments

  4. Regular log review: Periodically review logs for patterns

  5. Set up alerts: Configure alerts for error patterns

  6. Maintain log hygiene: Ensure logs are meaningful and not excessive

Integration

Log viewing integrates with:

  • Monitoring systems (Datadog, New Relic, etc.)

  • Log aggregation services (ELK stack, Splunk)

  • Alerting systems for error notifications

  • CI/CD pipelines for deployment history

Troubleshooting

No logs appearing

# Check deployment status
wheels deploy status

# Verify deployment ID
wheels deploy list --recent

Log export failing

# Check available disk space
df -h

# Try smaller time range or line limit
wheels deploy logs --lines 1000 --output partial.log

See Also

Previouswheels deploy lockNextwheels deploy proxy

Last updated 2 days ago

Was this helpful?

- Check deployment status

- Execute deployment

- Audit deployment configuration

deploy status
deploy exec
deploy audit