Documentation Index
Fetch the complete documentation index at: https://mintlify.com/RtlZeroMemory/Rezi/llms.txt
Use this file to discover all available pages before exploring further.
Logs Console Widget
The logs console widget displays streaming log entries with real-time filtering, search, auto-scroll, and performance optimized for high-volume output.Basic Usage
Log Entry Structure
Log Levels
Supported log levels:trace- Dark gray (100, 100, 100)debug- Light gray (150, 150, 150)info- White (255, 255, 255)warn- Yellow (255, 200, 50)error- Red (255, 80, 80)
Adding Log Entries
Filtering
By Level
By Source
By Search Query
Combined Filters
Auto-Scroll
Expandable Details
Clear Logs
Timestamps
Token Counts (LLM Logs)
Display token usage for LLM API calls:Duration Display
High-Volume Performance
The logs console is optimized for streaming high-volume output:- Virtualized rendering (only visible entries are rendered)
- Circular buffer with configurable max entries (default: 10,000)
- Efficient filtering with Set-based lookups
- Auto-scroll with minimal re-computation
Real-World Example: API Monitor
Props Reference
LogsConsoleProps
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | Required | Widget identifier |
entries | readonly LogEntry[] | Required | Log entries to display |
scrollTop | number | Required | Vertical scroll position |
onScroll | (scrollTop: number) => void | Required | Scroll callback |
autoScroll | boolean | true | Auto-scroll to bottom |
levelFilter | readonly LogLevel[] | — | Filter by log levels |
sourceFilter | readonly string[] | — | Filter by sources |
searchQuery | string | — | Search query |
showTimestamps | boolean | true | Show timestamps |
showSource | boolean | true | Show source labels |
expandedEntries | readonly string[] | — | Expanded entry IDs |
focusedStyle | TextStyle | — | Focused console style |
onEntryToggle | (entryId: string, expanded: boolean) => void | — | Entry expand callback |
onClear | () => void | — | Clear logs callback |
focusable | boolean | true | Include in tab order |
accessibleLabel | string | — | Accessibility label |
focusConfig | FocusConfig | — | Focus appearance |
scrollbarVariant | "minimal" | "classic" | "modern" | "dots" | "thin" | "minimal" | Scrollbar style |
scrollbarStyle | TextStyle | — | Scrollbar color |
LogEntry
| Field | Type | Description |
|---|---|---|
id | string | Unique entry ID |
timestamp | number | Unix timestamp (ms) |
level | LogLevel | Log level |
source | string | Source/category |
message | string | Log message |
details | string | Optional expandable details |
tokens | TokenCount | Optional token usage |
durationMs | number | Optional duration |
costCents | number | Optional cost in cents |
LogLevel
Constants
Related Widgets
- Virtual List - General-purpose virtualized lists
- Code Editor - Multi-line text editing
- Diff Viewer - Diff display
Location in Source
- Implementation:
packages/core/src/widgets/logsConsole.ts - Types:
packages/core/src/widgets/types.ts:2168-2244 - Factory:
packages/core/src/widgets/ui.ts:logsConsole()