wheels deploy logs
View deployment logs from servers.
Synopsis
Description
The wheels deploy:logs
command allows you to view Docker container logs from your deployed application and database containers. This is essential for troubleshooting issues, monitoring application behavior, and debugging production problems.
Options
servers=<string>
- Specific servers to check (comma-separated list)tail=<number>
- Number of lines to show (default: 100)--follow
- Follow log output in real-time (default: false)service=<string>
- Service to show logs for: app or db (default: app)since=<string>
- Show logs since timestamp (e.g., "2023-01-01", "1h", "5m")
Examples
View recent application logs
Follow logs in real-time
View last 50 lines from specific server
View database logs
View logs from the last hour
Follow database logs from specific server
View logs since specific date
How It Works
The command:
Connects to target servers via SSH
Executes
docker logs
on the specified containerStreams or displays the output based on options
Supports multiple servers with clear separation
Output Example
Single server logs
Multiple servers
Use Cases
Real-time monitoring
Troubleshooting errors
Database debugging
Performance analysis
Time Formats
The since
parameter accepts various formats:
Relative:
5m
,2h
,1d
,1w
ISO 8601:
2024-01-15T14:30:00
Date only:
2024-01-15
Docker format:
2024-01-15T14:30:00.000000000Z
Service Selection
Application logs (default)
Shows logs from the main application container:
Database logs
Shows logs from the database container:
Best Practices
Use tail wisely: Start with reasonable line counts to avoid overwhelming output
Follow sparingly: Use --follow only when actively monitoring
Filter at source: Use
since
to reduce data transferCombine with tools: Pipe to grep, awk, or other tools for analysis
Monitor both services: Check both app and database logs when troubleshooting
Troubleshooting
Container not found
Verify deployment is active with
wheels deploy:status
Check service name matches (app or db)
Ensure container is running
No logs appearing
Container might be new with no logs yet
Check if logging is configured correctly
Verify Docker logging driver settings
SSH timeout
Logs might be very large
Use
tail
parameter to limit outputUse
since
to reduce time range
Permission denied
Ensure SSH user has Docker access
Check if user is in docker group
Verify sudo permissions if needed
Advanced Usage
Export logs to file
Continuous monitoring with timestamps
Log analysis pipeline
Notes
Logs are retrieved directly from Docker containers
No log rotation or management is performed by this command
Large log files may take time to transfer
Follow mode requires stable SSH connection
Container must be running to view logs
See Also
wheels deploy:status - Check deployment status
wheels deploy:exec - Execute commands in containers
wheels deploy:push - Deploy application
Last updated
Was this helpful?