Logging
FTL provides access to logs from your deployed services, allowing you to monitor and troubleshoot your applications.
Basic Usage
View logs from all services:
bash
ftl logs
Command Options
View Specific Service Logs
bash
ftl logs [service]
Command Flags
-f
,--follow
: Stream logs in real-time-n
,--tail <lines>
: Number of lines to show from the end of the logs (default is 100 if-f
is used)
Examples
View All Service Logs
bash
# Show logs from all services
ftl logs
Stream Specific Service Logs
bash
# Stream logs from a specific service
ftl logs my-app -f
Customize Log Output
bash
# Show last 50 lines from all services
ftl logs -n 50
# Show last 150 lines from a specific service
ftl logs my-app -n 150
Log Sources
FTL collects logs from:
Application Services
- Main application containers
- Custom service containers
Dependencies
- Database containers
- Cache services
- Other supporting services
System Services
- Nginx reverse proxy
- SSL certificate management
Best Practices
Log Monitoring
- Use
-f
flag during deployments - Monitor application startup
- Track dependency initialization
- Use
Log Analysis
- Check logs after deployments
- Monitor for error patterns
- Review performance issues
Troubleshooting
- Start with recent logs
- Focus on specific services
- Use appropriate line counts
Common Issues
No Logs Available
If no logs are displayed:
- Verify the service is running
- Check service name spelling
- Ensure deployment was successful
Log Access Issues
If unable to access logs:
- Verify SSH connection
- Check server permissions
- Ensure service exists
Next Steps
- Learn about Tunneling
- Explore Health Checks
- Review Zero-downtime Deployments
TIP
Use ftl logs -f
during deployments to monitor the process in real-time.