Dev Overlay
A floating panel that displays logs in real-time during development, with filtering, search, and metrics visualization.
Quick Setup
Add the overlay to your root layout:
The overlay appears as a floating button in the corner of your screen. Click it or press Cmd+L (Mac) / Ctrl+L (Windows/Linux) to toggle the panel.
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
position |
'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' |
'bottom-right' |
Position of the toggle button and panel |
endpoint |
string |
'/api/vestig/logs' |
SSE endpoint for server log streaming |
toggleKey |
string |
'l' |
Keyboard shortcut key (used with Cmd/Ctrl) |
defaultSize |
{ width: number; height: number } |
{ width: 500, height: 400 } |
Initial panel dimensions |
defaultOpen |
boolean |
false |
Whether to start with the panel open |
Features
Real-time Log Streaming
The overlay connects to your server via Server-Sent Events (SSE) to display logs in real-time. Both server-side and client-side logs appear in the same panel.
Filtering & Search
- By Level: Filter logs by trace, debug, info, warn, or error
- By Namespace: Show logs from specific parts of your app
- By Source: Toggle between server, client, or all logs
- Search: Full-text search across log messages
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd/Ctrl + L |
Toggle overlay |
Esc |
Close overlay |
Metrics Tab
The overlay includes a Metrics tab showing Core Web Vitals (LCP, CLS, INP, TTFB, FCP) when you have VestigMetrics configured.
SSE Endpoint Setup
Create the log streaming endpoint:
Programmatic Access
Using the Log Store
Access the log store directly for custom integrations:
Custom Hooks
Best Practices
1. Development Only
Always wrap the overlay in an environment check:
2. Log Levels
Use appropriate log levels for better filtering:
3. Namespaces
Use namespaces to organize logs and make filtering easier:
Reconnection Behavior
The overlay automatically reconnects to the SSE stream if the connection drops, using exponential backoff with a maximum of 5 retry attempts.
Next Steps
- Web Vitals — Monitor Core Web Vitals in the Metrics tab
- Logging Basics — Learn about log levels and namespaces
- Server Components — Logging in RSC