lc logs
Display logs from LocalCloud services with advanced filtering options.Usage
Arguments
service
(optional) - Specific service to show logs for
Flags
Flag | Short | Description | Default |
---|---|---|---|
--follow | -f | Follow log output | false |
--tail | -n | Number of lines to show from the end | 100 |
--since | Show logs since timestamp (e.g., 1h, 30m) | "" | |
--level | Minimum log level (debug, info, warn, error) | "" | |
--output | Output format (text, json) | text | |
--search | Search logs for specific term | "" |
Examples
Show all logs
Follow logs from specific service
Show specific number of lines
Filter by time
Filter by log level
Search logs
JSON output
Service Names
Valid service names:ai
(alias:ollama
)postgres
(alias:database
)redis
(alias:cache
)minio
(alias:storage
)
Log Format
Text Format (Default)
JSON Format
Log Levels
Logs are categorized by level:Level | Color | Description |
---|---|---|
DEBUG | Cyan | Detailed debugging information |
INFO | White | Informational messages |
WARN | Yellow | Warning messages |
ERROR | Red | Error messages |
Log Storage
Logs are stored in:Advanced Filtering
Combine filters
Time formats
- Relative:
1h
,30m
,10s
- Absolute:
2024-03-14T15:04:05
- Human:
"1 hour ago"
,"yesterday"
Real-time Monitoring
Follow mode (-f
) shows logs in real-time:
Ctrl+C
to stop following.
Service-Specific Logs
AI Service (Ollama)
Common log entries:- Model loading progress
- Inference performance
- Memory usage
- API requests
PostgreSQL
Common log entries:- Connection attempts
- Query execution
- Checkpoint activity
- Error messages
Redis
Common log entries:- Client connections
- Memory usage
- Persistence events
- Command statistics
MinIO
Common log entries:- API requests
- Bucket operations
- Storage statistics
- Access logs
Troubleshooting
No logs appearing
Log file too large
Logs are automatically rotated at 100MB. Old logs are compressed and kept for 7 days.Permission denied
Performance Tips
- Use filters to reduce output volume
- Limit tail size for faster response
- Use JSON output for programmatic parsing
- Search specific services instead of all logs
Integration
Parse JSON logs
Save to file
Related Commands
lc status
- Check service statuslc ps
- List containerslc debug
- Debug informationlc service logs
- Alternative log viewing