Log Viewer
Powerful log search and analysis for debugging production issues and tracing errors.
Overview
The Log Viewer provides developers and operations engineers with centralized access to application logs across all services. Search, filter, and export logs for debugging production issues, investigating errors, and analyzing system behavior.
Key Capabilities
- Full-Text Search: Fast search across millions of log entries
- Advanced Filtering: Filter by level, service, time range, and metadata
- Regex Support: Pattern matching for complex searches
- Export: Download filtered logs for offline analysis
- Real-Time Tail: Stream live logs as they arrive
Feature Components
Log Search Interface
Search Bar:
- Placeholder: “Search logs (e.g., errors, user email, request ID)”
- Full-text search across message, stack traces, metadata
- Regex Support: Enable for pattern matching
- Autocomplete for common searches
Search Examples:
error payment failed- Find payment errorsrequest_id:req_abc123- Trace specific requestuser@example.com- Find all logs for a user/timeout.*database/- Regex for DB timeouts
Filters Sidebar
Log Level:
- ERROR (only errors and critical)
- WARNING (warnings and above)
- INFO (informational and above)
- DEBUG (all logs, including verbose)
Service:
- API Server
- SMTP Service
- Queue Workers
- Web Frontend
- Database
Time Range:
- Last hour
- Last 24 hours
- Last 7 days
- Custom (date picker)
Advanced Filters:
- Request ID
- User ID
- Tenant ID
- IP Address
Log Results View
Table Columns:
- Timestamp (ISO 8601)
- Level (color-coded)
- Service
- Message (truncated)
- User/Request ID
Color Coding:
- 🔴 ERROR: Red background
- 🟡 WARNING: Yellow background
- 🔵 INFO: Blue text
- ⚪ DEBUG: Grey text
Expandable Rows:
- Click to view full log entry
- JSON viewer for structured metadata
- Stack trace with syntax highlighting
- Related logs (same request ID)
Export Options
Formats:
- CSV: Tabular data for spreadsheet analysis
- JSON: Structured data for programmatic processing
- TXT: Plain text for grep/awk analysis
Export Limits:
- Max 10,000 rows per export
- Async job for exports > 1,000 rows
- Email notification when export ready
User Stories
Developer (Tracing Production Error)
“A customer reported a 500 error at 10:15am. I need to find the error and stack trace to debug the issue.”
Workflow:
- Navigate to
/dashboard/system/logs- Set time range: “Custom” → 10:10-10:20am
- Filter level: ERROR
- Search: customer email or request ID from support ticket
- Find error log entry
- Expand row to view full stack trace
- Identify code path and root cause
- Deploy fix and verify resolution
Operations Engineer (Live Debugging)
“I’m deploying a new feature and want to monitor logs in real-time to catch any issues immediately.”
Workflow:
- Navigate to log viewer
- Filter service: “API Server”
- Filter level: “WARNING” (warnings and errors)
- Enable “Follow Tail” mode
- Deploy feature
- Watch logs stream live
- If errors appear, pause tail and investigate
- Otherwise, confirm clean deployment
Technical Integration
Elasticsearch Backend (2026 Spike)
- Cluster: 3-node cluster for high availability
- Index Strategy: Daily indices (e.g.,
logs-2025-12-04) - Retention: 90 days (auto-deleted on rotation)
- Query Performance: <1s for most searches
Structured Logging
Log Format (JSON):
{
"timestamp": "2025-12-04T12:30:00Z",
"level": "ERROR",
"service": "api",
"message": "Payment processing failed",
"request_id": "req_abc123",
"user_id": "usr_xyz",
"tenant_id": "tn_456",
"error": {
"type": "PaymentError",
"message": "Insufficient funds",
"stack_trace": "..."
}
}
Sentry Integration (2026 Spike)
- Error Tracking: Errors automatically sent to Sentry
- Linked: Log viewer shows Sentry issue link for errors
- Context: Sentry captures breadcrumbs and user context
Performance Considerations
Search Optimization
- Indexed Fields: timestamp, level, service, request_id, user_id
- Full-Text Index: message, error.message, error.stack_trace
- Query Caching: 5-minute cache for common searches
Data Volume
- Ingest Rate: ~100GB logs per day
- Total Storage: ~10TB (90 days retention)
- Query Concurrency: Support 50+ concurrent searches