Logs & Debugging
Master Runtime’s logging capabilities to quickly diagnose issues in your deployments.Log Types
Basic Commands
Search & Filter
Single Keyword
Multiple Keywords (OR)
Regex Patterns
Pipe-Friendly Output
Raw Mode
Piping to grep
Piping to Other Tools
JSON Output
For programmatic access:Processing with jq
Processing with Python
Common Debug Scenarios
Build Failures
- Missing dependencies in
requirements.txt/package.json - Wrong Python/Node version
- Network issues downloading packages
Deploy Failures
- Health check timeout (app not starting fast enough)
- Port mismatch (app listening on wrong port)
- Missing environment variables
Runtime Errors
- Unhandled exceptions
- Database connection errors
- External API failures
Health Check Debugging
The health check must:- Respond at
/health(or customhealth_path) - Return HTTP 200
- Respond within 100ms
Testing Locally
If Health Checks Fail
Environment Variable Issues
Missing Variables
Wrong Values
Performance Debugging
Slow Requests
Memory Issues
Best Practices
Add structured logging
Add structured logging
Use JSON logs for easier parsing:
Log at appropriate levels
Log at appropriate levels
- DEBUG: Detailed debugging info
- INFO: Normal operation events
- WARNING: Something unexpected but handled
- ERROR: Something failed
Include context
Include context
Include request IDs, user IDs, etc. to trace issues:
Don't log secrets
Don't log secrets
Never log API keys, passwords, or PII. Runtime redacts known secrets, but be careful.
Related
runtm logs- CLI reference- Logs API - API reference