Console
The Console is a powerful telemetry viewer that displays logs from your instrumented applications in real-time. It provides advanced search, filtering, and navigation capabilities.
Video Demo
Watch this demonstration of the Console:
Opening the Console
Use any of these methods:
- Command Palette:
Ctrl+Shift+P/Cmd+Shift+P→SF Veritas: Show Console Logs - Activity Bar: Click the SF Veritas icon → Console option
- Context Menu: Right-click in editor → SF Veritas options
Interface Overview
The Console interface consists of:
- Toolbar: Contains search bar, filters, log level selector, and service selector
- Log List: Displays log entries with timestamps and source information
- Stats Bar: Shows entry count, types, and duration
Log Display
Log Entry Information
Each log entry displays:
- Timestamp: When the log was generated
- Log Level: DEBUG, INFO, WARN, or ERROR (color-coded)
- Source: Service name or "browser" for frontend logs
- Message: The log content
- File/Line: Source code location (clickable)
Log Levels
| Level | Color | Description |
|---|---|---|
| DEBUG | Gray | Debug information |
| INFO | Blue | General information |
| WARN | Yellow | Warnings |
| ERROR | Red | Errors and exceptions |
Filtering by Level
Click the level selector in the toolbar to show/hide specific log levels.
Search
The Console supports a powerful search system with multiple query types.
Basic Search
Just type your search term:
user authentication
This finds logs containing both "user" and "authentication".
Exact Phrases
Use quotes for exact phrase matching:
"user logged in successfully"
Regular Expressions
Use forward slashes for regex patterns:
/^Error:.*/
Common regex patterns:
/^Session.*/- Lines starting with "Session"/error/i- Case-insensitive "error"/\d{3}-\d{4}/- Phone number patterns
Boolean Operators
Combine searches with AND/OR:
"error" AND "database"
"timeout" OR "connection refused"
Complex Queries
Combine different search types:
(/error/ OR /warn/) AND "database"
"user" AND /session-\d+/ AND "failed"
Search Controls
- Case Sensitive Toggle: Enable/disable case sensitivity
- Match Counter: Shows number of matching entries
- Clear Search: Click the X or press Escape
Filter Mode
Filter mode hides logs that don't match your criteria. Use it to remove noise.
Adding Filters
- Via Context Menu: Right-click a file in Explorer → "Add to Console Filter"
- Via Editor: Select a function → Right-click → "Add Function to Filter"
- Via Toolbar: Click the filter icon and configure
Filter Types
- File/Folder Paths: Filter by source file
- Functions: Filter by function name
- Multiple Items: Combine multiple filters
Example: Hide Third-Party Logs
Filter out logs from node_modules:
- Click filter icon in toolbar
- Add path filter:
node_modules - Logs from node_modules will be hidden
Focus Mode
Focus mode shows only logs that match your criteria. Use it to isolate specific areas.
Adding Focus Items
- Via Context Menu: Right-click a file in Explorer → "Add to Console Focus"
- Via Editor: Select a function → Right-click → "Add Function to Focus"
- Via Toolbar: Click the focus icon and configure
Example: Focus on One Service
To see only logs from your authentication service:
- Click focus icon in toolbar
- Add file focus:
src/auth/ - Only logs from auth files will be shown
Service Filtering
When running multiple instrumented services:
- Click the Service Dropdown in the toolbar
- Select specific services or "All Services"
- The Console will show logs from selected services only
This is useful when debugging microservices architectures.
Navigating to Source Code
Click any log entry with a file location to jump directly to that line in your code:
- File paths in log entries are clickable
- Stack traces in exceptions have clickable frames
- Function names link to their definitions
Performance Considerations
The Console is optimized for large datasets:
- Virtualized Rendering: Only visible entries are rendered
- Debounced Search: 300ms delay prevents lag during typing
- Two-Tier Storage: Full history for search, buffer for display
Best Practices for Large Datasets
- Use filters to reduce visible entries
- Search to narrow down to relevant logs
- Configure retention settings for long-running sessions
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Focus Search | Click search bar |
| Clear Search | Escape or click X |
| Navigate Results | Arrow keys |
Troubleshooting
No logs appearing
- Verify your application is instrumented correctly
- Check that the local server is running
- Ensure the application is sending to the correct endpoint
Search not finding expected results
- Check case sensitivity setting
- Verify your regex syntax
- Ensure the time range includes the logs you're looking for
Console feels slow
- Use filters to reduce the visible dataset
- Check
sfVeritas.databaseRetentionDayssetting - Consider clearing old data