Skip to main content

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:

  1. Command Palette: Ctrl+Shift+P / Cmd+Shift+PSF Veritas: Show Console Logs
  2. Activity Bar: Click the SF Veritas icon → Console option
  3. 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

LevelColorDescription
DEBUGGrayDebug information
INFOBlueGeneral information
WARNYellowWarnings
ERRORRedErrors and exceptions

Filtering by Level

Click the level selector in the toolbar to show/hide specific log levels.

The Console supports a powerful search system with multiple query types.

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

  1. Via Context Menu: Right-click a file in Explorer → "Add to Console Filter"
  2. Via Editor: Select a function → Right-click → "Add Function to Filter"
  3. 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:

  1. Click filter icon in toolbar
  2. Add path filter: node_modules
  3. 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

  1. Via Context Menu: Right-click a file in Explorer → "Add to Console Focus"
  2. Via Editor: Select a function → Right-click → "Add Function to Focus"
  3. Via Toolbar: Click the focus icon and configure

Example: Focus on One Service

To see only logs from your authentication service:

  1. Click focus icon in toolbar
  2. Add file focus: src/auth/
  3. Only logs from auth files will be shown

Service Filtering

When running multiple instrumented services:

  1. Click the Service Dropdown in the toolbar
  2. Select specific services or "All Services"
  3. The Console will show logs from selected services only

This is useful when debugging microservices architectures.

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

  1. Use filters to reduce visible entries
  2. Search to narrow down to relevant logs
  3. Configure retention settings for long-running sessions

Keyboard Shortcuts

ActionShortcut
Focus SearchClick search bar
Clear SearchEscape or click X
Navigate ResultsArrow keys

Troubleshooting

No logs appearing

  1. Verify your application is instrumented correctly
  2. Check that the local server is running
  3. Ensure the application is sending to the correct endpoint

Search not finding expected results

  1. Check case sensitivity setting
  2. Verify your regex syntax
  3. Ensure the time range includes the logs you're looking for

Console feels slow

  1. Use filters to reduce the visible dataset
  2. Check sfVeritas.databaseRetentionDays setting
  3. Consider clearing old data

Next Steps